Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,707
Community Members
 
Community Events
184
Community Groups

JQL inconsistency after linking issues

Hello Everyone,

we have a problem where after creating linked issues in a groovy script with createIssueLink() and running a JQL query, the latter returns inconsistent results as if the linked issues weren’t reindexed yet.
Regarding the createIssueLink() in Jira documentation it says "Constructs a new issuelink from the sourceIssueId to the destinationId and persists it. This operation will cause a re-index of the associated
issues."
https://docs.atlassian.com/software/jira/docs/api/7.1.4/com/atlassian/jira/issue/link/IssueLinkManager.html
The documentation is unclear whether the createIssueLink method blocks until the reindex is performed or not, in any case running a JQL query immediately after a createIssueLink which deals with the created issues links, returns an out-of-date result.

 

PS: reindexing with:

boolean wasIndexing = ImportUtils.isIndexIssues();
ImportUtils.setIndexIssues(true);
issueLinkManager.createIssueLink(fromIssue.getId(), toIssue.getId(), Long.parseLong(linkId),
null, user);
ImportUtils.setIndexIssues(wasIndexing);

 

didn't work for me.

 

Thanks  in advance,

Nicolas.-

1 answer

0 votes
Daniel Yelamos [Adaptavist]
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.
Oct 04, 2018

Hi Silicon.

Could I have a look at your full script? I have just tested this locally and I can assure you that on my instance, createIssueLink triggered a reindex. 

Could you also add your JIRA version?

To further my point, there was a feature to request that createIssueLink could opt out of the reindexing event, and it was denied. 

You can read more about this here:

JRASERVER-30144

Cheers!

DY

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events