You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I know there is JQL like this to find if it is exist:
Summary ~ "keyword"
How about to check if it is not exists?
I am trying to write sth like:
if(issue not exist){ create issue }
However I can now only write sth like this (I have to add rubbish action otherwise it gots error):
if(issue exist){ rubbish action } else {create issue}
You can check the Summary for the absence of text. For example...
summary !~ "hello"
The above would return all issues that do not have the word hello in the summary field. Note, checking for the absence of text can be a bit fragile.
Following the JQL statement you can check for the number of items returned and if zero, you can proceed with your action.
I have tried sth like this:
(summary ~ "hello") = 0
However JIRA won't let me pass, is there anything I've missed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no, that will not work. you need to create an automation rule. I mistakenly assumed that was the environment you were working in.
So that I might be able to further assist let's step back a bit. Could you explain your exact use case? What is it that you are trying to accomplish and why? It seems that you wish to create an issue of a certain summary if an issue with that summary does not exist. However I may be off a bit here and I think a better understanding of the exact requirements would help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> It seems that you wish to create an issue of a certain summary if an issue with that summary does not exist.
Yes, exactly, you already got it.
I am working on creating an automation rule, and writing an JQL query in the if-block, writing sth like (summary ~ "hello") = 0 and hoping it would work but getting a red error unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Devon Chan ,
I've taken the time to create an automation for you which is illustrated below. To be honest I'm a bit perplexed by your use case and how you plan to run this query. I can't imagine that you're checking for the same text repeatedly. Maybe you're wanting some dynamic automation where it would prompt you for the text to search for and then if nothing found create a 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 Jack!!
My instinct feel that there should be sth like "insert into if not exists" as in SQL, however JQL do not have a simple way to do that, which makes me feel weird.
Anyway, I can tell you my use case. I have to manage more than 60 products at the same time therefore I have to make this efficient enough to make product cards with tags, every month. That's why I need the automation to do that for me instead of manually making every card by hand.
Wish you a nice day :)
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.