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
Component : CONTINUOUS DELIVERY DIRECTOR
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.
3: POST PATCH:3.1 As a part of fix you need to upgrade to 7.3.0.3b70 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 releases.id, ",", phase.id from releases, phase where phase.release_id =releases.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#!/bin/bashexport CDD_SERVER_URL=http://CDD-HOSTNAME:8080export CDD_TENANT_ID=00000000-0000-0000-0000-000000000000export CDD_API_KEY=*********IFS=','while read -a line; doif [[ "${#line[@]}" -eq 2 ]]; thenrelease_id=${line[0]}phase_id=${line[1]}URL="${CDD_SERVER_URL}/cdd/design/${CDD_TENANT_ID}/v1/releases/${release_id}/phases/${phase_id}/tasks/transitions"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 2elseecho "INVALID INPUT not processing ${line[*]}"fidone
Steps to execute the script