Automation: Perform action if issue with specific key exists

F_ Wolf March 21, 2020

Hi there,

I'm having trouble creating a condition for a certain issue key which does not exist. If the project ("CHANGE" in this case) exists, the JQL is not valid:

Anmerkung 2020-03-21 183217.png

 

But if the project does not exist, it is valid:

 

Anmerkung 2020-03-21 183425.png

 

Any solution to this?

 

Best regards,

Florian

1 answer

0 votes
Erik Buchholz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2020

The question is quite interesting. Especially the behavior when the project does not exist.

The question is, how do you generate the key you are looking for? What is the goal you want to reach with your rule?

F_ Wolf March 25, 2020

I'm trying to link issues based on the description. E.g. if the desciption contains [A-Z]+-[0-9]+, it should automatically link this issue. But this is producing errors from time to time, because the issue key may not exist (e.g. COVID-19). To suppress the errors, I'd like to check if the issue exists before linking it.

Like # people like this
Erik Buchholz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2020

I found this example from Andreas Knecht.

https://confluence.atlassian.com/automation072/automatically-linking-issues-just-got-that-much-easier-1056675670.html

It does exactly the same and generates errors if

  • no issue is mentioned,
  • the key is not valid.

I completely agree that rules that generate errors are bad rules but perhaps this is how it should work. It's a quite simple rule and you could turn off the error messages.

If this solution is unsatisfactory you should ask Andreas how they handle that.

Edit: fixed link after Automation for Jira now belongs to Atlassian.

F_ Wolf March 26, 2020

The linking works (and yes - it is almost exactly the same as in the article you've mentioned). I'll check it later as it is currently not a blocker, just a bad situation seeing all the errors flying around.

Travis Hill March 1, 2023

@F_ Wolf Did you ever figure this out? I have the same problem. The rule is actually suggested in Jira's automation library (linking issues that are mentioned in comments) but doesn't handle this case.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events