Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello, I need to create a rule that notifies me (by email) when a new issue is created and exists a ticket in other project where a custom field of the ticket created is the same, how can I create this?
I created one, but didn't work (the issue created if one of those issue types, and there is an issue that math the JQL, but in the log I got this: the issue didn't match the specified JQL (most likely), how can I set that I need exists one issue that match that jql and not the created one?)
Thanks in advance.
Hi @Sara , it would really help to see the structure of your JQL. I realize you have an obfuscated for a reason which I certainly understand. Would it be possible for you to create a JQL that is using test projects search that you could share the full JQL?
This is the JQL: project = "X" and issuetype in ("t1", "t2") and status in ("Under Mapping", "Final setup") and "S name[Labels]" = {{issue.S name}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So the JQL condition as written is assessing the issue being created. For example if "project X" is not the project associated with the issue being created then the condition would fail. Is that your intent? I thought you are trying to query for the existence of an issue in a different project. I think what you want is to use a Branch - Related issues and choose JQL. Further, within that branch, you will check to see if the JQL returns non-zero results and if true then send the email.
If I am off track here please let me know. If my assessment is accurate and you need further help please let me know. In order for me to take a reasonable attempt at the rule I need to know if the following statement accurately represents your use case.
When an issue is created in project-ABC I wish to search project-X for any issues where the value of custom field–123 is the same as the custom field–456 in the issue that triggered the rule. If any search issue exist in project – X then send an email to the dataoperations-manager.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sara , have a look at this. There may be other approaches as well.
my image does not show it but at the end after the compare you have an action to sed an email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jack Brickey ! finally I was able to created but the variable is set as empy but the custom field has value, not sure why. See next screenshots of the issue created and the log:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please share your rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you add an Audit log action right after the trigger that logs the value of your custom field - {{issue.Spider name}}
note, you need to be sure that the custom field name is precisely the same including capitalization as your custom field.
retest your rule, and let's assess what that value is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got it!!! thank you so much for all your help.
Now I just trying to set the proper email with all the information needed. Just a last question ( I promise!) is there a way to get the issuekey from the results of the lookup issues to add it the email? I've never used this option before. Thanks a mil again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok. in that image it appears that the variable now has the expected value. Before that was not the case. Now the issue is in the lookup issues. For test purposes, could you simplify that JQL as follows
Project = "Business requests" and "Spider name[Labels]" = {{xProjectMatch}}
I am just trying to zero in on where the air might be. Also let me verify that your custom field is precisely named Spider name[Labels]. Is the [Labels] part of the name? Would you mind performing the JQL search below in the Advanced search issues view?
Project = "Business requests" and "Spider name[Labels]" = target
I am assuming that some issues in the project have "target" as the value in your custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
we crossed wires on our responses so forgot the above...
regarding "is there a way to get the issuekey from the results of the lookup issues to add it the email?" below is an excerpt from the docs that could be used in the comment...
All fields and custom fields can be accessed from the lookupIssues list. For example, to print the issue key for each issue in bullet point form:
1 {{#lookupIssues}}
2 * {{key}}
3
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I’ve tested but got an error, the custom field I used to match is type labels, maybe is due to this? (xProjectMatch={{issue.Spider name})
this is the error I got: Error rendering smart-values when executing this rule: Improperly closed variable: {{issue.Spider name}
Thanks so much for all your help! really appreciate it
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.