Hi,
I'm attempting to automatically assign future sprints to tasks, based on the sprint start/end date and issue start/due date. My current flow has been:
trigger on issue due date change
send web request to fetch all sprints from the board
new branch for each smart value {{Sprint}}
if statements with {{issue.customfield_10015.isAfter(sprint.StartDate)}} equals True and {{issue.DueDate.isBefore(Sprint.DueDate)}} equals True then edit sprint field of issue with Sprint.ID.
When running this automation the triggered issue is always not update due to not passing the if statements. I logged separately issue/sprint information to be sure that the data is access properly and all is fine, but I think the problem comes from the different date/time format of the fields. In example Sprint dates are in format 2023-01-29T22:19:00.000Z with issue Due/Start date being 2023-01-24, which prevents .isBefore/isAfter checks to work.
Is there need of any type of conversion of values before comparing them to make this flow work or usage of specific comparison approach when working with system and custom date fields?
Hi @Daniel Dimitrov , welcome to the Atlassian Community!
If you check out this link, you are able to use these formats to change the date/time values that your smart value returns.
These smart values can be used to format any date values, such as {{issue.Due Date.jiraDate}} will return only the date. So perhaps if you try this on your sprint date, then it will be able to compare the two dates
Hi @Callum Carlile _Automation Consultants_ ,
I played with that however something is still not right. So I've logged the exact conditions for comparison, to see when the spring information will return True for both checks
however the actual check, which uses the same type of values is not working, since the automation still says:
below is the exact setup in the automation, for which I also tried advanced comparison with true or True (in case it is case-sensitive)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I attempted to do something similar. I did discover that the Sprint won't actually iterate through the futureSprints, rather it is reading the Sprint value (if any) from the issue in question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.