Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with custom fields not updating in issue filters vs on the task itself after a sql update

Gary Leverich June 25, 2020

Hello,

I have a custom field named "eRelease". I ran a mass update with a SQL update statement in the SQL Server jira_db database. Here is the SQL:

update jiraschema.customfieldvalue set STRINGVALUE = '13606' where CUSTOMFIELD = 13001 and ISSUE IN (47676, ...)

Now when I go into JIRA and search for any of these tasks, the eRelease field shows correctly updated to the new value on the task page itself.

BUT, if I go to Issues -> Manage Filters and run a filter with this detail:

eRelease in (4.98) ORDER BY resolved DESC, reporter ASC

It will still only return under the old value and not under the new value.

Is this data cached? Am I missing a spot I need to update? What do I need to do so that when I run a filter, it agrees with the value on the tasks page?

Any help would be greatly appriciated!

Thanks, Gary

 

2 answers

1 accepted

0 votes
Answer accepted
Joe Pitt
Community Champion
June 25, 2020

It sounds like you broke something in the database. You should NEVER update the database directly. If you took a JIRA backup before the update you should restore from that. 

0 votes
Gary Leverich June 25, 2020

Thanks Joe, going back is no problem, I have the data backed up.

I'm just tinkering with it trying to save time with having to update hundreds of tasks.

Is there no support for doing stuff like this that could help me?

I have the exact same problem when I run a very simple update like this:

update jiraschema.jiraissue set creator = 'gleverich' where id = 48475

Now when I search for the task in JIRA, it shows me as the one tho created the task.

But if I go to Issues -> Manage filters and search for all tasks created by me I don't get any results. If I search for all tasks created by the user that was in there before I updated it, it returns the task. 

I'm just curious if I'm doing something wrong in the SQL, or is it caching the data or what?

Thanks for the response!

Gary

Joe Pitt
Community Champion
June 25, 2020

The JIRA database has multiple pointers and finding them all probably isn't possible. The database should only be updated using the UI or the API, never directly using SQL. There may be a plugin in the marketplace that will give you the flexibility you're looking for. I've never used the API but if you post for help in using it you should get some replies. 

Gary Leverich June 25, 2020

OK thanks for the help!

Suggest an answer

Log in or Sign up to answer