User Story Validation Is Stuck
If the validation of a user story is taking longer than usual, this may be due to the process failing at some point, thus causing the validation to get stuck and locking the User Story record with a pop-up message
The validation process of a user story is the same as when you enable the Promote and Deploy checkbox in the user story, but when you validate it, the Deployment record that is created contains a CheckOnly deployment step and nothing gets deployed. The validation process will create a Promotion record and a validate only Deployment record. Once the validation deployment is completed successfully or with errors, the validation process will finish. It is important to understand that Copado will only consider that the validation process is completed when the status of the validation deployment is Completed Successfully or Completed with Errors. If the deployment doesn't complete (status In Progress), or if it never starts (status Draft), Copado assumes that the validation process is not completed yet, and the user story will keep refreshing until the status of the deployment changes to Completed Successfully or Completed with Errors.
There are three fields in the User Story object that will help you check the status of the validation:
- Last Validation Deployment
- Last Validation Promotion
- Last Validation Deployment Status
Once you have located the three fields, check below the possible causes that could have led to a stuck validation.
Scenario #1: There is a problem with the user story or its feature branch, and the deployment step is not created in the Validation Deployment record. This will prevent the deployment from starting and the status will always be Draft.
The Last Validation Deployment Status field shows status Draft. The same status is displayed on the User Story Promotions related list.
In order to complete the validation, you need to manually change the status of the deployment by doing a url hack to access the edit page overriding the Visualforce page. You must be in Classic interface for the url hack to work. The url would look like this one:
Scenario #2: There was a problem during the execution of the validation deployment that prevented the status from being updated to Completed, and it's stuck on In Progress.
If you log into the destination org and navigate to the Deployment Status page in the Setup, you will confirm that the validation deployment was already completed.
The Last Validation Deployment Status field in the user story still shows status In Progress. The same status is displayed in the User Story Promotions related list. If you click on the Last Validation Deployment link, you will see that the deployment status is In Progress.
In order to complete the validation, you need to manually change the deployment status by doing a url hack to access the deployment page overriding the Visualforce page:
Once you are in the standard page, click on the deployment step name and then on the deployment job name in the Deployment Jobs related list. Change the Status field of this record to Success or Fail and the % Deployed field to 100 or 0 depending on whether the validation deployment was successful or not and save the changes.