Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

A ScriptRunner 'canned script' which reindexes only issues in particular projects.


Warning

This script no longer works with ScriptRunner, as the FilterUtils.getSearchResults  method has recently disappeared. I shall fix this in due course, or PRs welcome.


JIRA's reindex screen will be familiar to JIRA admins:

...

  1. Ensure you have the ScriptRunner for JIRA plugin installed.
  2. On the filesystem, go to the scripts/ directory in your JIRA Home Jira home directory (henceforth $JIRAHOME) directory (create it if not present).you should see a scripts/ directory created by ScriptRunner.
  3. cd  into this directory, $JIRAHOME/scripts 
  4. Download the attached reindexprojects.zip to the server into $JIRAHOME/scripts/ . I do this by right-clicking, copying the URL ( $url ), then running curl -LOJ $url
  5. cd to the $JIRAHOME/scripts directory and unzip. unzip reindexprojects.zip 
  6. You should now have a file, $JIRAHOME/scripts/com/onresolve/scriptrunner/canned/jira/admin/ReindexProjects.groovy
  7. In JIRA type . or gg to bring up the admin search, and search for 'Built-in Scripts':


     
  8. You should now see a new Reindex projects built-in script:
     


  9. Click 'Reindex projects', pick the projects you want to reindex, and click 'Preview' or 'Run':

...