Custom Template Lost after upgrade to JIRA Agile 5.5 and above
Symptoms
- After upgrade from JIRA 4.2.x to JIRA Agile 5.5 and above, custom templates lost.
Importance - Check whether the custom template references exist in the database (GH_CONFIGURATION property), if no, please refer to GHS-2276.
- If custom templates exist in "GH_CONFIGURATION" but custom template missing, proceed to try resolution below.
Cause
JIRA Agile only referred to GH_CONFIGURATION for custom templates value only, although the custom template setting exist in database as shown below.
property_key |
---|
1296745989047_CONFIGURATION |
For more detail please refer to GHS-2975
Resolution
- Manually Update "GH_CONFIGURATION" property with custom template's value.
IMPORTANCE:PLEASE BACKUP JIRA INSTANCE BEFORE IMPLEMENT THE FOLLOWING METHOD
Steps
Run query below to retrieve custom templates settings
select * from propertyentry e right join propertytext t on e.id=t.id where ENTITY_NAME = 'GreenHopper' AND PROPERTY_KEY LIKE '%_CONFIGURATION';
- Find the result's "property_key" start with number, for example 1296745989047_CONFIGURATION. Copy the value from propertyvalue column to a text editor ( for edit and update later).
You will have result like below:
<map> <entry> <string>1296745989047_gh.configuration.cardbgcolored</string> <boolean>true</boolean> </entry> <entry> ... ... <entry> <string>1296745989047_CONFIGURATION_NAME</string> <string>Mogul Standard Greenhopper Template</string> </entry> </map>
- Remove the first <map> and the last </map> tag.
- Do the same for the other templates' configuration
- Save this configuration now.
Copy the value of "GH_CONFIGURATION" propertyvalue to editor. You can execute this query:
select * from propertytext where id = (select id from propertyentry where ENTITY_NAME = 'GreenHopper' AND PROPERTY_KEY = 'GH_CONFIGURATION');
Paste custom templates' values that modified in earlier step 6 to the second last line of "GH_CONFIGURATION" value ( before the last </map> tag)
</entry> <--------here </map>
Also ensure that you have the following tag in the resulting XML where the numbers represent the id's of the templates :
<entry> <string>CUSTOM_TEMPLATES</string> <string>1327219184250,1327219088335</string> </entry>
Update database
update propertytext set propertyvalue = 'the_contents_of_step8' where id = (select id from propertyentry where ENTITY_NAME = 'GreenHopper' AND PROPERTY_KEY = 'GH_CONFIGURATION');
- Restart JIRA.