What JIRA problems can indicate a need for re-indexing?

Sometimes we have users who cannot create new issues, despite clearly having permissions to do so. The problem seems to go away if we re-index.

We know that re-indexing is recommended after configuration changes, etc.
But are there other symptoms such as the above that can indicate the need for a re-index?  Other problems which can be fixed by a re-index?

Finally, are there any messages in the log files which can advise us of the need to re-index?

Thanks in advance.


2 answers

0 votes

Re-indexing should be done when there are certain config changes (of which, the list is gradually shrinking), during big system changes, and when something big has gone wrong.

The problems you describe strongly suggest a broken add-on or someone trying to be "clever" when they really have no idea what they're doing.  You should never have to re-index to fix permissions.

So, some questions:

  • What user-installed add-ons do you have? 
  • Do you have any customised files? 
  • Have you allowed any access to the Jira database other than the Jira user? 
  • Can you check the logs for errors or warnings around permissions?

Thanks Nic,
No customized files (that I know of), And no one is messing with the database, I'll check the log files. 
Here's a list of the user-installed plugins:

  • Adaptavist ScriptRunner for JIRA
  • Atlassian REST API Browser
  • Atlassian Universal Plugin Manager Plugin
  • Automation Lite for Jira
  • Automation Module
  • Bob Swift Atlassian Add-ons - JIRA CLI Connector
  • JavaMelody Monitoring Plugin
  • JIRA Automation SPI
  • JIRA Software Chinese (China) Language Pack
  • JIRA SSL Add-on
  • JIRA Suite Utilities
  • JIRA Syntax Highlighter Plugin
  • JIRA Working Hours Plugin
  • Mail Queue Monitor REST API
  • Portfolio for Jira
  • Portfolio Live Plans
  • Portfolio Team Management
  • psmq-pluginquerydsl-4.0.7-provider-plugin
  • Support Tools Plugin
  • System Plugin: Tempo Accounts
  • System Plugin: Tempo Core
  • System Plugin: Tempo Planning API
  • System Plugin: Tempo Platform - JIRA
  • System Plugin: Tempo Platform API
  • System Plugin: Tempo Teams
  • Tempo Timesheets
  • Zephyr for JIRA

The end-user cannot reproduce the problem, but I am getting errors like this in the log quite regularly:

 /secure/RapidBoard.jspa [c.a.j.p.webfragment.conditions.AbstractIssueCondition] Trying to run condition on an issue, but no issue exists

Aha - In this case there was a broken validation script which depended upon a certain value in a drop-down. The end-user chose the "bad" value and the create would not happen. Then after I re-indexed, the same end user chose a different value and the create worked.

I need to find a way to convert these "in-line" scripts into file storage scripts that can be put into source control, because someone broke the script in a way that caused inconsistent behavior.

Sorry for the bother.

Ahh, well spotted.  Given your list of add-ons, the first line of my response was going to be "a broken script", although I was thinking more of a post-function than a validator (that's the usual way I get scripts wrong!)

Scripts can be done in Jira with in-line boxes or by existing on the disk under a "scripts" directory in the jira home directory.  The files on disk are a simple 1:1 - you create a plain text file, copy and paste the in-line script into it, remove the in-line script and point the caller to the file instead.

My usual setup is a set of sub-directories in the script home, one for validators, one for post-functions etc.  The other way I do it sometimes is "directory per business unit or project needing the scripts", but it really is about doing what works best for you.  You can imagine that this makes it easy to source control them, with simple "get labelled files" or "get latest" commands run on servers pulling a set of files.  It won't stop your admins writing new scripts in-line and telling Jira to use them instead, but at least you'll have source control and a good excuse to kick any admin who doesn't use it!

I don't know if there's a way to en-masse convert inline scripts to files, I'll ask tomorrow.  Worst case, there is the "script repository" which will list them all, at least making the copy and paste a matter of one screen.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,138 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you