You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
We received a requirement to change the name of Bug to Defect in Jira, but I've identified that many of the JQL filters created in our Jira instance reference that issuetypes name, and not the id.
After a little testing, I figured out we can just use that issuetypes id and it works in place of the name. See example below.
// This will give you a list of bugs, but if the name is changed to defect for example, this JQL will break.
issuetype = "Bug"
// But if you change the JQL to this, it will be resilient to name changes.
issuetype = 10004
It's great we have a solution to this and we can update to the issuetype id before we migrate the changes, but is there a way to find out which filters have components that reference the name property instead of the id property so I don't have to go through JQL filters one by one?
Is there a way to not only find the list of filters using this convention, but also a way to update those filters programmatically using something like ScriptRunner or Jira Automation?
easiest way would be to check the database. Thats how we usually handle these filters.
The corresponding table would be "searchrequest"
SELECT * FROM searchrequest WHERE reqcontent LIKE '%issuetype = Bug%' OR reqcontent LIKE '%type = Bug%';
Thank you so much for that info! That will really help to save me some time. I appreciate you taking the time to comment and help out!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using @Kai Sören Becker 's suggestion to solve the "bonus" you defined, you could craft an SQL UPDATE statement which replaces "issuetype = Bug" with "issuestpye = 123" directly in the database using string replace, so that the other parts of the JQL remains untouched.
Notes:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome info @Aron Gombas _Midori_ , thank you for that, I'll be looking into it more today. Much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.