jira cloud automation - need to capture sprint change in custom field
Asked by Ramesh S:

I want to track the issues when it got spill over to the next sprint or future sprint.

I tried to create an automation rule to capture the "Sprint before change" and "Sprint after change", but I didn't get the right smart values to use it![image.png](/t5/image/serverpage/image-id/343403i81FE3BD484D39FD1/image-size/large?v=v2&px=999 "image.png")

Can anyone help here?


Answers:
author: Marc - Devoteam
body: Hi [@Ramesh S](/t5/user/viewprofilepage/user-id/3651960)

I doubt if this is possible.

But also why, the Sprint field retains all the old sprints an issues was in, so this information is already visible.

The Sprint Report will also provide all information on issues not completed in the sprint.

comments: author: Ramesh S
body: Hi Marc,

We are handling the development and testing in different phases. We execute the sprint only for development activity and the testing is performed on the future sprints.

So the issues will not reach the done status until the testing is completed.

Due to this we couldn't use the Sprint Report effectively.

So I'm trying to find alternative option to capture the issues spill over to next sprint. Planning to query those issues using filter and track it in the dashboard.


author: Bill Sheboy
body: Hi [@Ramesh S](/t5/user/viewprofilepage/user-id/3651960)

Yes, and...to the suggestions from Marc:

While there are changelog fields available to rules when a field-change trigger is used, **this will not work correctly for the Sprint field**. There are known defects where list fields such as Sprint and Fix Version do not accurately provide the changes to rules, and so suggestions with the {{changelog}} and {{fieldChange}} smart values will not help.

There are two workarounds for this to meet your scenario:

* simple approach
  * Use two rules, one triggered on *Sprint Started* which marks as issue as in the sprint and another rule triggered on *Sprint Competed* to mark incomplete issues when the sprint finished. Those markers / indicators could be done with custom fields, labels, or entity properties.
  * Use the indicators in your saved filter for the dashboard to visualize any issues carried over to the next sprints
* complex approach
  * Using the REST API endpoints and the Send Web Request action, your rule could read the changelog and use complex smart value expressions to parse the results and build an accurate record of the actual sprint changes
  * Additional handling may be needed when the changelog has many entries, requiring multiple paging calls, and possibly chained-rules, to process the results

Kind regards,  
Bill


author: Duc Thang TRAN
body: Hello [@Ramesh S](/t5/user/viewprofilepage/user-id/3651960)

In a case before moving to the next sprints, your ticket already has only 1 sprint before the change.

You can use a smart value like this one:

`Before {{issue.sprint.first.name}} or `{{fieldChange.fromString}}

`After : {{issue.sprint.last.name}}`.

But when an issue has more than one sprint, I think it's complicated but not impossible. You need to combine it with smart values using regex (text) or a list of smart values.

Hope this can help :)


Tags: cloud

jira-cloud