I'm working in the Jira MySQL database. I need to retrieve the initial setting vallue of a custom field that is a dropdown. I can get the setting using thechange group tables, but only after someone has changed the field value. I need the value when the issue is created and someone sets it then.
I create an issue and select a value from the custom field drop-down. I save the issue. The issue show the setting of the field.
I run a query on the custom field tables to retrieve the setting and it is not set, it's value is NULL.
I have tried other tables like th propertystring and the node tables, but no go.
Anyone have any ideas on this?
The value is replaced in the database. Many applications don't keep the previous value of fields. If the value is never updated the old value isn't copied to the history so it isn't there for you. Just the way it works. That is the trade off with a COTS product.
Thanks again. The problem is not the history, I can get that easily from the changegroup tables. I need the initial setting. If the initial setting is 'Open', for example, then I want to get that value: Open.
The table: customfieldoption, has the options and their ID's for a particular drop-down custom field, somehow that option ID should be traceable back to the Issue so we can say in this issue, this is the setting on this CF, at initial state. If the interface can get the value then it must be gettable in the DB.
Or, how does the jql in the interface know how to search by the CF value on issues, if jql uses the Db then it must be there somewhere.
Default value for multiselect is:
select defaultvelue from customfield where cfname = 'yournameforcustomfield';
If it's NULL, than first value from field value list is taken:
select * from customfieldoption where CUSTOMFIELD=(select id from customfield where cfname = 'yournameforcustomfield') and SEQUENCE=0;
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....
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!
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