Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

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

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
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

75 views 0 4
Read article

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