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

Mark Johnson December 15, 2017

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.

Mark

2 answers

0 votes
Mark Johnson December 18, 2017

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 19, 2017

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.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2017

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?
Mark Johnson December 18, 2017

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
Mark Johnson December 18, 2017

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

Mark Johnson December 18, 2017

The symptoms the user described seem to match this:
https://confluence.atlassian.com/jirakb/cannot-create-issues-300814318.html

Suggest an answer

Log in or Sign up to answer