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") = 0However JIRA won't let me pass, is there anything I've missed?
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.
> 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.
It looks like you're new here. Sign in or register to get started.