I'm bulk adding labels to JIRA issues using a custom Groovy script as explained in the answer to the following question:
https://answers.atlassian.com/questions/132132
When processing about 10,000 issues in a Groovy I don't want to let JIRA re-index each issue because it slows down the entire process. For example, when using LabelManager.addLabel() method in a loop, JIRA apparently indexes each issue.
Is it possible to programmatically suppress indexing of each issue until the script completes? (then I'll do a full re-index after everything got completed)
Thanks!
Shaakunthala
Community moderators have prevented the ability to post new answers.
I would guess IssueIndexManager:hold() do the job. The indexing should be held till release().
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
:( I'm working on an old instance (5.0.x) and this method is available from 5.1 up. So it doesn't work. Thank you for the answer - it's helpful though it doesn't work for me at this time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sameera,
You can use addLabel from LabelService instead of LabelManager. Unlike LabelManager, LabelService should not perform reindexing. Javadoc says nothing about reindexing but you can notice that DefaultLabelManager constructor takes IssueIndexManager as parameter and LabelService does not have IssueIndexManager as param. I believe that the same situation with all other corresponding Manager and Service classes. At least I am sure about IssueManager and IssueService.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
LabelService is built on LabelManager and IssueManager - I guess the issue will be indexed underhood.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are right, I made wrong conclusion :-(
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.