Override User Story Promotion Merge Order

Updated 2 months ago by Copado Solutions

As of v12, you can change the order in which user stories get merged in the promotion branch. By default, the user stories order is based on the name field in ascending order. However, you can override this criteria and define your own order criteria.

In a Pipeline or Promotion record, you can find a field called Order User Stories by that lets you override the default name ordering to a different user story field with asc or desc ordering.

Pipeline

Promotion

If the pipeline order field is not empty and the promotion order field is empty, the promotion will inherit the pipeline order field value. If both fields are empty, then the default order applies (user story name field in ascending order).

For example, if you have three user stories (US-0009, US-0001, US-0006), by default they will be merged in ascending order like this: US-00001 > US-00006 > US-00009. However, you can change this order based on a different field.

You can leverage the Priority__c field in the user story to define a custom merge order, or you can also create your own custom field. If, for instance, you use the Priority__c field, go to the Pipeline or Promotion record and type Priority__c asc in the field Order User Stories by. Open the three user stories and add a value in the Priority__c field (US-00001.Priority__c = 3, US-00006.Priority__c = 1, US-00009.Priority__c = 2). Then, when you create a promotion deployment, the user stories will be merged in this order: US-00006 > US-00009 > US-00001.


How did we do?