[ 
http://jira.codehaus.org/browse/CONTINUUM-2403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197139#action_197139
 ] 

Maria Odea Ching commented on CONTINUUM-2403:
---------------------------------------------

Make sure you delete the build results first before deleting the build 
definition from the database. It is tedious looking for the build results from 
the UI, it is somewhat easier (but still painful) by querying the database 
directly. Here are a few SQL statements that is helpful for checking project 
groups, projects and build results that reference the build definition:

select PROJECTGROUP.NAME from SCHEDULE, BUILDDEFINITION, PROJECTGROUP, 
PROJECTGROUP_BUILDDEFINITIONS where PROJECTGROUP_BUILDDEFINITIONS.ID_EID = 
BUILDDEFINITION.ID and PROJECTGROUP.ID = PROJECTGROUP_BUILDDEFINITIONS.ID_OID 
and SCHEDULE.name = [NAME OF YOUR SCHEDULE] and SCHEDULE.ID = 
BUILDDEFINITION.SCHEDULE_ID_OID;

select PROJECT.NAME from SCHEDULE, BUILDDEFINITION, PROJECT, 
PROJECT_BUILDDEFINITIONS where PROJECT_BUILDDEFINITIONS.ID_EID = 
BUILDDEFINITION.ID and PROJECT.ID = PROJECT_BUILDDEFINITIONS.ID_OID and 
SCHEDULE.name = [NAME OF YOUR SCHEDULE] and SCHEDULE.ID = 
BUILDDEFINITION.SCHEDULE_ID_OID;

select PROJECTGROUP.NAME, PROJECT.NAME, BUILDRESULT.PROJECT_ID_OID, 
BUILDRESULT.ID, BUILDRESULT.BUILD_URL, BUILDRESULT.BUILD_NUMBER from 
PROJECTGROUP, PROJECT, SCHEDULE, BUILDDEFINITION, BUILDRESULT where 
BUILDRESULT.BUILD_DEFINITION_ID_OID = BUILDDEFINITION.ID and SCHEDULE.name = 
[NAME OF YOUR SCHEDULE] and SCHEDULE.ID = BUILDDEFINITION.SCHEDULE_ID_OID and 
PROJECT.ID = BUILDRESULT.PROJECT_ID_OID and PROJECT.PROJECT_GROUP_ID_OID = 
PROJECTGROUP.ID;

> Build definition is not removed in database even if you've already removed 
> the build definition from the project/project group and all the build results 
> that references it
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CONTINUUM-2403
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-2403
>             Project: Continuum
>          Issue Type: Bug
>          Components: Database
>    Affects Versions: 1.3.4
>            Reporter: Maria Odea Ching
>
> Because of this, it is not possible to delete the schedule where this build 
> definition is attached.
> To reproduce this:
> 1. Create a new schedule named 'SCHEDULE_1'
> 2. Create a new build definition for your project group and attach this build 
> definition to 'SCHEDULE_1'
> 3. Build the project group
> 4. Delete the build definition for the project group
> 5. Delete the build results that used this build definition
> 6. Delete 'SCHEDULE_1'
> You will not be able to delete SCHEDULE_1 and get the following error:
> 'The schedule cant be removed, it is probably used by a build definition.'
> If you look at the BUILDDEFINITION table, you will see that the build 
> definition you created in step 2 is still there even though no project 
> group/project/build result references it.
> This only happens if you already used the build definition for building the 
> project (e.g. a build result was created). Otherwise, the build definition is 
> removed from the database.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to