Hello,
I am trying to establish a link between the newly created ticket to a preexisting one that exactly matches the newly created issue's summary.
I am able to get the preexisting issue(s) by using an "if" block before the "link issues" component that matches the summary, however,
It seems the Rule is failing with the below details:
Please help.
Hi @lrodriguez and welcome to the community!
It looks to me like your regex is trying to find where the summary contains an issue key in it. From what you're trying to achieve, I think you want something like this:
Hi Mark, thank you for your prompt reply.
My issue is more specifically related to the linking portion. The error I am getting is coming from trying to link the newly created issue back to the preexisting one:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even if I try to "Link the issue to the trigger issue", the preexisting bug doesn't update the linking portion, and the audit log doesn't display any errors
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It may be possible to do it the way you're trying to do it, but the main issue I see with your current approach is that your regex is against the issue summary and assumes your summary contains issue key(s). I don't think that's your intent. You would need to instead do something like this:
{{lookupIssues.match("([A-Z]+-\d+)}}
But again, this will likely cause you fits if you have more than 1 matching issue because lookupIssues will provide the result set in an array and you'll need to iterate through the array with some kind of advanced branching.
The approach I shared is just looking at this from the opposite perspective... Rather than trying to link your new issue to a potential list of similar issues, branch into each of the matching issues and link them to your new issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for simplifying the approach.
In essence, I am trying to create a rule that triggers upon an issue being created.
More specifically, If the newly created issue's summary equals any preexisting issue(s), then set the newly created ticket's status to "Rejected", and link it to any preexisting ones (without modifying the preexisting one's status).
Is there a straightforward example you could share?
Many thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the additional context. I understand why you need to perform the lookup issues action. Give this a try:
Quick explanation....
summary ~ "{{issue.summary}}" AND key != {{issue}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Mark. It seems the query is still having issues.
Please advise.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please show me the latest screenshot of your rule?
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.
Your syntax looks good. The only thing I can think of is that you maybe need to do some quote escapes. What happens if you try this:
summary ~ "\"{{summary}}\"" AND key != {{issue}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks again Mark. It seems the rule is not failing anymore, but it's not quite achieving its purpose. The newly created ticket did not get past the lookup issue JQL query. For testing purposes, I have a preexisting identical ticket open for triggering this rule, but it seems it wasn't able to get there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just noticed that your advanced condition has a space. It should be this:
{{lookupIssues.size}}
Greater than
0
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.