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

 

 

Although the pop-up message can be hidden, it will appear again every time you open the user story and will keep refreshing continuously. Below, you will find detailed information that will help you understand what happened and how to stop the validation.

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
 

 

If you do not have these fields in the layout, you can add them or run a user stories' report, filter by User Story Reference and add the three fields to the report to see their current values.

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.

 

 

 

If you click on the Last Validation Deployment link, you will notice that the deployment doesn't have any steps. This deployment will never start and the status will never change.

 

 

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. The url would look like this one:


https://COMPANY_DOMAIN/RECORD_ID/e?nooverride

 

 

This scenario will happen also if you have the Online Conflict Resolution feature enabled in your pipeline. If there is a conflict during the merge of the feature branch into the validation promotion branch, the Validation Deployment record will be created without steps, and you will have to follow the steps above to complete the validation of the user story after manually resolving the conflicts in the validation promotion.

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:

https://COMPANY_DOMAIN/RECORD_ID?nooverride

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.


How did we do?