Hello All,
Re-Indexing an issue is not working all the time using below script in script listeners:
MutableIssue mutableIssue = ComponentAccessor.getIssueManager().getIssueObject(issue.id);
boolean isIndex = ImportUtils.isIndexIssues();
ImportUtils.setIndexIssues(true);
IssueIndexingService issueIndexingService = (IssueIndexingService) ComponentAccessor.getComponent(IssueIndexingService);
issueIndexingService.reIndex(mutableIssue);
ImportUtils.setIndexIssues(isIndex);
Please help me!
Thanks in Advance,
Mani
I don't know if that will fix your issue, but you can try to index the immutable issue instead of the mutable one.
If you think about it... the immutable issue represents what's in the DB while the mutable one may not have been saved yet.
If you are making changes to your mutable issue, make sure you store those changes with issueService.update() or issueManager.updateIssue() before indexing so that the index will include those changes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.