1

I am working to build an automation in JIRA that will allow the automation to check, on a monthly basis, that stories meeting the criteria (Label A AND Start date 30 days ago; Label B AND Start date 60 days ago; Label C AND Start date 180 days ago; Label D AND Start date 365 days ago) are cloned with certain fields populated (either copied or with specifically defined values) and that the original stories have their Start Dates updated so that they will be found eligible the next time the Automation runs and the specified amount of time has passed.

Currently, I have an automation rule that checks monthly on a specified date at 1am local time for stories with Label A, B, C, and D.

Then I have four branches. One for each Label.

The first branch checks to see if Stories with Label A have a Start Date of 30 days ago using the advanced time comparison feature. If they validate successfully, then all stories that pass will clone, copying specified values to the clone as needed except the Label (we don't want clones of clones). Then the automation is instructed to change the Start Date on the original to "Today" so that the next Month's automation will look back and see this date and validate accordingly.

The second branch checks (Label B and 3 months ago), The third looks for (Label C and 6 months ago) and the fourth looks for (Label D and 1 year ago ago).

For example, the Label B advanced time comparison is running to see if:

{{issue.Start Date.setTimeZone("America/Los_Angeles").plusMonths(3).jiraDate}}

equals

{{now.setTimeZone("America/Los_Angeles").jiraDate}}

The "Start Date" attribute is a custom field in our project with the type 'Date Picker'.

The problem is that sometimes this works as-is, and sometimes it doesn't. The Atlassian community has explained that Jira Time is somehow different than the field type, so I've tried using the JQL to equalize by using the setTimeZone and jiraDate terms. This is most frustrating.

I'm looking to gain a better understanding of how to run these comparisons successfully so that my team doesn't need to rely on manual intervention to reschedule tasks through Jira, as well as JIRA statements that can succeed for all four conditions.

0 Answers0