I've been asked to change the project key and name for one of our JIRA projects.
I've read the document https://confluence.atlassian.com/adminjiraserver075/editing-a-project-key-935391076.html and have tested the change in our test JIRA instance.
The only problem I have found is that some filters that refer to the old project name will no longer work after the change, so I need to change the filters to refer to the project key instead (as they will then continue to work after the change is made).
I'd prefer to do this without having to ask every filter owner to do this manually, so I tried using this SQL to update the searchrequest table directly:
UPDATE searchrequest
SET reqcontent = cast(replace(cast(reqcontent as nvarchar(max)),'"Test Project"','"TP"') as ntext)
where convert(nvarchar(max),reqcontent) LIKE '%"Test Project"%'
However, although the DB records are successfully updated, when I view any of the filters in the UI, the JQL still shows the project name rather than the project key.
Note: If I change a filter in the UI, the equivalent DB record is updated successfully.
I have checked the JIRA schema (https://developer.atlassian.com/server/jira/platform/attachments/jira-7-9-2-database-schema.pdf) and can't see any other DB table that holds the JQL for filters, so I assume this is an index problem.
I've manually searched the index files on the JIRA server (D:\Program Files\Atlassian\Application Data\JIRA\caches\indexes\entities\searchrequest), but can't find anything in there that refers to the project name (although I realise this may not show up in a text search).
I'm currently running a background re-index, but so far (50% in) the filter that has been changed to display the project key in the DB is still showing the project name in the UI.
Does anyone know whether this background re-index should fix my problem and, if not, what is best to try next? Restart JIRA? A full re-index? Something else? The background re-index is taking hours, so I'm trying to think ahead in case it doesn't work as I ideally need a resolution by Wednesday afternoon GMT!
We're using v7.5.2 of JIRA Software with v3.8.3 of JIRA Service Desk.
@Vikki Short , were you able to fix this? Could you update here?
Anyway, as @Thomas Deiler warned, I would be cautious before making any changes in db and I would stop Jira Services. What @Marc Minten (EVS) recommended should work if you have ScriptRunner plugin, if not try running COMMITT to save the changes in your db.
Hi, I understand Thomas warning, but I do this also more often, no problems.
However, I have the scriptrunner add-on and just after the database change I do a Jira Cache refresh (built-in script in scriptrunner). It works fine!
An alternative is stopping and starting Jira. (best would be : stop Jira, do changes, restart Jira)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Marc,
it is important in this forum, that is read by broad audience, to point out that direct modification of Jira's DB is not recommended and if done could seriously harm your system.
I doubt that the average technical expertise of the audience has the same high level than yours!
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Vikki Short,
I hope you stopped Jira before modifying the DB directly. At all it is not recommended to alter the tables the way you described. The weird behavior could be the side effect.
Use the REST API instead. There are a lot of calls to access filters. See the API doc.
I have no best recommendation what to do next. Eventually you will need to restore a backup.
So long
Thomas
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.