Saturday, April 10, 2010

Create a JSR 168 compatible JIRA portlet for Liferay.

Although Liferay web portal has a JIRA portlet which comes under World of Liferay (WOL), it is not a generic portlet which can be configured to work with any JIRA installation. It is written in a way which can display the issue summery from the Liferay organisation's JIRA application. This portlet is tightly bundled with several other portlets which are also in the WOL category. Also the code of the portlet was scattered everywhere, which made it is very difficult to understand. So extending the functionalities and maintaining the code was extremely hard.

But I had a requirement of creating a portlet which can be communicate with any JIRA installation. So I implemented a JSR 168 compatible portlet for JIRA. You can refer to this for get an idea about how I implemented that. Following diagrams shows the JIRA portlet.
  • This is the first view of the portlet when you add that to the portal page.
  • After user click on the link above, he can see the following edit mode of the portlet. Here user needs to enter the URL of the JIRA application and the Login name of the JIRA.
  • After the required values are entered these values are stored as preferences to the portlet and it will display the success message as follows.
  • Finally after the user Return to the full page, it will display the issue counts as follows.
You can download the complete source code of it from here and feel free to use it and give comments.