In the latest versions of JIRA, more and more standard functionalities are pushed into bundled plugins as opposed to the JIRA core product. No better way to showcase the plugin architecture, I must admit!
But that does make the life of high end users, who wants to modify those bundled plugins, a bit difficult.
Let me take a 'once used to be simple' scenario!
"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:
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!