User Stories Ahead and Behind
If you are working with Copado Continuous Delivery, you may already be familiar with the concept of user stories ahead and user stories behind. The term user stories behind refers to those stories promoted to an upper environment that have not yet been back-promoted to a particular lower environment, hence the lower environment is behind its immediate upper environment. Similarly, the concept of user stories ahead refers to the stories that are pending promotion to the following environment in the pipeline, so the lower environment that contains those user stories is ahead of the following environment in the pipeline.
Let’s consider this basic pipeline:
If you promote a user story from dev2 to UAT, for instance, Continuous Delivery automatically displays that user story on the Pipeline page as available for back-promotion to dev1. Click on the left arrow and you will see the user story on the User Stories Behind tab:
That user story will also be displayed as available for promotion to production. If you click on the right arrow, you will find it under the User Stories Ahead tab:
When Is the User Stories Ahead and Behind Calculation Triggered?
As you have seen, Copado’s user stories ahead and behind calculation is triggered every time you create a user story and move it across your pipeline. But that’s not the only scenario. This calculation is also triggered when:
- You create a brand new environment.
- You refresh a sandbox.
If you create a new sandbox based off of your production environment, that sandbox already contains whatever you have in your production environment. Therefore, Copado’s user stories ahead and behind calculation doesn’t include the user stories that were already in production when you created the sandbox and doesn’t display them on the Pipeline page.
The same happens when you refresh a sandbox. You don’t need to back-promote to the refreshed sandbox the user stories that were already in production when you refreshed the sandbox since your refreshed sandbox already contains that code. To ensure Copado’s user stories ahead and behind calculation exclude these user stories, you just need to navigate to the Environment record of the refreshed sandbox and enter the refresh date in the Last Refreshed Date field: