But that does make the life of high end users, who wants to modify those bundled plugins, a bit difficult.
"I want to display description before issue details in the View Issue page"
This used to be pretty easy because all you need to do was to modify the relevant jsp file and that's it!
But now, the View Issue screen rendering is done by the jira-view-issue-plugin and it is an Atlassian system plugin. Although the actual work is simple, we only need to modify the atlassian-plugin.xml, making those changes effective is not as simple as editing the jira-view-issue-plugin-xxx.jar from JIRA_Home/plugins/.bundled-plugins folder.
Reason is pretty simple. All the system plugin jar files under JIRA_Home/plugins/.bundled-plugins are overwritten by the original jar files from atlassian-bundled-plugins.zip file under JIRA_Install_Directory/atlassian-jira/WEB-INF/classes/ folder whenever JIRA is restarted.
Solution? Modify the jar files under the atlassian-bundled-plugins.zip directly! Following are the steps and these steps are applicable to modifying any atlassian bundled plugins:
- Extract the atlassian-bundled-plugins.zip file under atlassian-jira/WEB-INF/classes folder to a separate directory.
- Put your customized system plugin jar in place of the existing jar file. You can either build the customized jar file from its source or just extract the jar, modify the files and create it back.
- Zip all the jars back with the same name: atlassian-bundled-plugins.zip
- Restart JIRA. It will automatically overwrite the already existing jar in JIRA_HOME/plugins/.bundled-plugins folder.
And we are done!
Steps 1-3 can be done easily if you have a utility like 7-zip in windows. For the example we considered, all we need to do is to modify the atlassian-plugin.xml file inside the jira-view-issue-plugin-5.x.jar. The different modules on view issue page like Details module, Description module etc are web-panel plugin modules and its order can modified with the weight attribute.
By default details-module has weight 100 and descriptionmodule has weight 200. The resulting default screen in JIRA appears like the following.
When I performed the above steps after changing the weight of details-module to 200 and descriptionmodule to 100, the resulting view issue screen is as follows.
Not a huge task but I have stumbled initially on why the changes are not getting effective when you modify those jars in .bundled-plugin folder directly. I'm sure someone else will come across the same issue, some day. Hope they find this post useful ;)
You won't find this one but there are a few other handful tricks in the JIRA Development book released a few months ago. Don't forget to have a look if you haven't seen it yet!