Hello!
I am working on an automation rule that should create a new issue in a project 5 days prior to version's release date.
I thought it should look like this:
-A scheduled rule that runs every day
-If condition is met: it returns issues from this project, with a specific component, where difference between today and version release date is 5 days
-It creates a Task with some pre-populated fields
The only problem here is that "Release date[Date]" = startOfDay(5) does not seem to work.
I tried using condition that compares two custom values with this set up:
{{startOfDay.diff(issue.fixVersions.releaseDate.jiraDate}} = 5
But it fails to get requested value and also parses way too many issues.
Perhaps someone had a similar case?
Thank you!
for those finding this with the same problem, here is a full screenshot of the automation rule:
Do you always have issues assigned to the next, unreleased version at that 5 day point? The answer will impact how you solve this.
Yes, the team always has issues assigned...
No, the team does not always have issues assigned...
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Bill!
Both are great suggestions. So trick is that we always have issues assigned to fix version that is going to be released, but I have to make sure it is the right one by limiting the search by component, because the project is for mobile development and they have parallel versions for different OS.
I will definitely use scheduled trigger and play around with Lookup to avoid parsing 1,000 issues.
Tim's suggestion to use double if conditions let's me grab it at exact date I need.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your Fix Version will ever have more than one entry, using conditions will not work as expected as it will return a list of dates. In that case you may either add smart value, list filtering, or use the max function on the releaseDate in the list of versions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you're already quite close to a workable solution.
This condition works fine for me ...
You'll probably also have to add another similar one which is greater than 4 days - so that results found are only for those which are between 4 and 5 days away.
If not, it will continue to find all previous release dates going backwards forever.
I hope this makes sense and is helpful?
Thanks,
TC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I noticed you just voted for my answer ... please free to "accept" if this has worked - so it marks as answered (and helps others in community find this solution in the future).
Also, it helps raise my profile (kudos points) 😀
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tim!
Thank you so much for this correction, this condition passes without an error, but it doesn't match an issue that has FixVersion set to version that releases 5 days from now, non October 21st (also tried with 23rd in case it counts business days).
I tested with both startOfDay and now
Was this different for you?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, it worked fine for me .... please check that the version is definitely set in the ADMSB project with associated release date and that version is assigned to the ADMSB-1 ticket?
Perhaps, use the "log action" event to record your smart values into the audit log to double check what's being found/compared....?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Tim,
Yeah the issue passes if it is less than now+6 and more than now +4 (because it is equal to now+5) so I just needed to sleep on this :) Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mykhailo Pavliuk - that's great news.
Glad to have helped. Don't forget to accept my answer so gets marked as solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Current IF condition for the rule that fails:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.