Hello! Not sure how to request this specifically, but I'm looking for some help with a specific Automation challenge I have. I've searched community, the documentation, etc and been unable to find a working solution. Here is what I am trying to do (√ next to steps I know and have working):
So I recognize that I can't use Smart Values in Related Issue Condition, but I wanted to highlight what I'm looking to do. My automation summary statement of success is the following:
"If a ticket is created as a certain release type, if there are any other issues of the same release type that have "Release Start" occurring on the same date as the newly created issue, Send a message to a channel".
Right now for this test I just want to get it to create a comment on the trigger issue, I can do all the other connections no problem, but I don't know how to compare date values (I'd love to have other variables that I can tune with later like +/- 2 hours of "Release Start" but for now I think just if it "detects another Release of the same type occurring on the same day, notify the team" is my MVP success criteria.
Thanks in advance for your help!
Would you please post an image of your rule and the audit log from an execution that doesn't work as you expect? Thanks!
I have not observed consistent behavior with the related issues condition when there are lots of criteria. As an alternative, if you can write JQL to perform your test perhaps try a Lookup Issues action and check if the return count is greater than zero. You would then have the resulting issues if you need to take action/messaging.
Best regards,
Bill
Thanks! Taking a look at this now along with another reply below as well :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Russell Zera
I saw your message, and I am unable to jump on a call currently, so I'll try to fill in more details for the Lookup Issues step and JQL...please let me know if this helps.
key != {{triggerIssue.key}}
AND "Release Start[Time stamp]" IS NOT EMPTY
AND "Release Start[Time stamp]" >= {{triggerIssue.Release Start.minusHours(2)}}
AND "Release Start[Time stamp]" >= {{triggerIssue.Release Start.plusHours(2)}}
Please note that I do not know the smart value for your custom field, such as {{issue.Release Start}}
If that smart value does not work, you may use the information in this how-to article to find it: https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/ Summarizing those steps you would:
myInstance.atlassian.net/rest/api/2/issue/issueKey?expand=names
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For comparing date values I have found that trying to match date values is a problem so better to use a range. @Bill Sheboy mentioned .diff() but you could also use 2 advanced compares. Here's one of mine which performs actions on issues which are now at 3 Business Days after a date custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! Taking a look at this now along with another reply above as well :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This looks like it's checking a set date against the date field in the Trigger or Destination issue to return True/False, vs checking if other issues within a certain group of projects also match the expression/range in their same custom date fields. I am definitely though going to see if I can leverage parts of this, very helpful. thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure what you mean by "I recognize that I can't use Smart Values in Related Issue Condition...", since Smart Values can be used in the JQL field of a Related Issue Condition.
The warning that appears in that dialog is only talking about validating the JQL. Thus, the "Validate query" feature is disabled when the JQL contains a Smart Value. The JQL will still work as written, with any Smart Value substitutions. You just can't validate it on-the-spot in that rule dialog.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there! Thank you for responding. I know that smart-values if used in JQL can't be validated, but I was actually referencing (but I might be misinterpreting) the documentation for "Related issues" condition that says "Use smart values here: No".
If I can use them then great! I guess it's more talking about using them in one of the fields OTHER than the Validating JQL field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Neither of the non-JQL fields in this component accept Smart Values.
So I did some tests with smart values in the JQL field of this "Related Issues / Sub-tasks" component.
I started with a pretty dumb smart value, and this JQL worked:
myField > {{#=}} 0 {{/}}
Then I tried this:
myField > {{issue.myField}}
and that also worked. However, my next attempt:
myField > {{issue.parent.myField}}
failed with a rule execution error. The substitution came back blank, causing a missing operand in the final JQL.
So some smart values seem to work. I'd be concerned that we're "outside the bounds of the documentation" here, but you might be able to make some progress working around the edges here.
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.