//how to wait for indexing to be complete?
IssueIndexingService indexService = ComponentAccessor.getComponent(IssueIndexingService)
long reindexTime = indexService.reIndexAll()
#after reindex has finished run a JQL query
@Beppe MarconI don't get you , once you trigger(background or fore ground indexing) you need to wait, and you waiting depends on how large is your instance. therefore what do you want to achieve here ?
Best!
my JQL isn't able to find certain link types between issues which have been created in the same Groovy postfunction running the JQL. I want to reindex at a certain point of the postfunction and run the JQL only after reindex has completed in order for the JQL to find all nodes and link types present.
How do I poll for completion and only after completion continue with my groovy postfunction?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In a post-function, you probably only want to re-index the current issue, or possibly a small set of issues that have a relationship with it (for example, as you suggest, all linked issues).
If you are indexing a small set of issues in the post-function, then you don't need to wait - the indexing for each is complete before it does the next step in the function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Reindexing single issue doesn't update links, I've tried the following:
boolean wasIndexing = ImportUtils.isIndexIssues()
ImportUtils.setIndexIssues(true)
IssueIndexManager indexManager = ComponentAccessor.getComponent(IssueIndexManager)
indexManager.reIndex(issue)
ImportUtils.setIndexIssues(wasIndexing)
still the JQL run after the above returns empty result, the same JQL in a separate postfunction returns correct results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.