Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Re-Indexing an issue is not working all the time using script listeners

mani@123
Contributor
July 31, 2019

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

1 answer

0 votes
PD Sheehan
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.
August 1, 2019

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.

Suggest an answer

Log in or Sign up to answer