It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JSU Precondition to check linked issue exist or not with summary contain

Hi,

I am using JSU jql precondition to find the existing linked issue exist or not with particular summary. If the issue exist then I will avoid creating duplicate ticket but what should I write in JQL query in JSU precondition to find the linked issue with particular summary.

 

JQL returning the details with but not working JSU precondition. 

issueFunction IN linkedIssuesOf("key=TEST-123",Milestone) and summary ~ "Test summary"

Any help much appreciate. 

 

Thanks,

Om

3 answers

1 accepted

0 votes
Answer accepted

Hi, note that you cannot do any kind of "contains()" on JQL so,

{issue.summary} ~ "Test Summary" is not a valid clause.

 

You can do summary ~ "Test Summary" to find out if linked issues have "Test Summary" string or you can use summary ~ {issue.sumary} to search for linked issue having similar sumary that the transitioned issue which i supossed is what you was trying to achieve.

 

But you cannot compare two plain strings using ~ operator, first need to be an issue field name.

Alternatively, you can also use JQL Booster Pack app which also provides the linkedIssuesOf() function, in case Script Runner for Jira is not present yet on your system.

@Jack Nolddor _Sweet Bananas_ 

 

is this correct

 

issueFunction IN linnkedissueof("key={issue.key}",Milestone) and "Test Summary" ~ {issue.summary}

If "Test Summary" is a field name, then yes. If it is a regular string then no since you cannot compare two Strings on JQL you need to compare a String against an existing field (system or custom)

Test Summary is not field name. It is summary . So I need to check linked issue has ABC summary or not. If it is there then I will ignore creating linked issues. So how I can write in JSU JQL to search ABC in linked summary?

issueFunction IN linnkedissueof("key={issue.key}",Milestone) and summary ~ "Test Summary"

here Summary is sytem field  and Test summary is text in subject line of Linked issue. look like above query should work right? 

Yep it looks better now,

Hi Om,

If you are using Scriptrunner as well, than Specified query:

issueFunction IN linkedissueof("key={issue.key}",Milestone) and summary ~ "Test Summary", looks good.

Without Scriptrunner, query will look like:

issue in linkedIssues({issue.key}, "Milestone") and summary ~ "Test Summary"

I hope this is of some help. If you need assistance, you can always raise a support ticket on the JSU support portal https://servicedesk-apps.beecom.ch/servicedesk/customer/portal/3

Thanks!

Hi @Omprakash_Thamsetty 

 

Could you please post the not working  query also

 

Hasna

@Hasna Please see above screen shot. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you