Inconsistency was found trying to reorder tasks
search cancel

Inconsistency was found trying to reorder tasks


Article ID: 212723


Updated On:


Continuous Delivery Director


Post upgrade to v7.3 in production, we are facing some inconsistencies white moving tasks from one phase to the other. Even while creating new tasks in the phase.


Release : 7.3



There is a defect identified and corrected in build 8.0 and 8.1 which prevent phases getting corrupted during drag and drop. For the already corrupted phases in 7.3 version the cumulative is released to fix the same.


  • The fix to correct corrupted phase is available in
  • The fix of stopping corruption from happening during re-ordering of task is part of 8.0 and 8.1
  • The API's that fix the task's transition exists is only in as we don't expect that to occur in 8.0/8.1 due to preventive code protecting it.
  • If user doesn't re-order and doesn't drag tasks from one phase to another - the corruption would not grow ( but the existing corrupted phases would stay corrupted, for which API is been made available in ).
    Recommended Approach
    1: Apply to Production
    2: Get list of releases and phased-id which are corrupted
    3: Run the shell script provided with input file having list of release-id, phase-id to fix existing corrupted records.

3.1 As a part of fix you need to upgrade to and post upgrading to correct the corrupted release & phase you need to execute the script making a REST call, which requires an input file of release-id, phase-id.

In case if you don't have complete list of corrupted phase ids, you may run the script on ALL phases of active ( non DONE ) releases.
You may use the following SQL query to get the list of all active phases:
select, ",", from releases, phase where phase.release_id and releases.release_status != 'DONE' order by releases.release_creation_date desc;
If there are too many active phases (more than 100,000) - you may share the export of the following database tables - and we would be able to detect the ids of the corrupted phases and can assist you on same.
  • releases  
  • phase
  • task
  • task_transition


3.2 Once you identified the release & phase-id corrupted you can create below script in your environment replacing the respective values and uncomment the line highlighted and can run as instructed it will automatically correct the corrupted releases.
The script is as below
export CDD_SERVER_URL=http://CDD-HOSTNAME:8080
export CDD_TENANT_ID=00000000-0000-0000-0000-000000000000
export CDD_API_KEY=*********
while read -a line; do
 if [[ "${#line[@]}" -eq 2 ]]; then
   echo "Processing request : curl -X POST --header 'Authorization: Bearer ${CDD_API_KEY}' --header 'Accept: application/json' ${URL}"
   #curl -X PATCH --header "Authorization: Bearer ${CDD_API_KEY}" --header "Accept: application/json" "${URL}" -o "response${release_id}_${phase_id}.txt"
   #echo "sleeping for 2s"
   #sleep 2
   echo "INVALID INPUT not processing ${line[*]}"

              Steps to execute the script

        1. Copy the content of the script above and change the respective variable values w.r.t. customer environment
        2. Save the script file and grant execute permission by running command chmod a+x script_file
        3. Create a input file in format release-id,phase-id with problematic release-id and phase-id
        4. Run the script as ./ < input_file.txt