Displaying JIRA Issues In Alfresco Share

I decided to submit a dashlet to Alfresco’s dashlet challenge. Basically, it’s a user dashlet for Alfresco Share that shows the user all of their JIRA issues that are either already overdue (shame on you!) or issues that are due to be completed soon. The idea behind it is that you can see at glance on your dashboard what issues you have to deal with right now.

To get the source for the dashlet, open up a terminal and run the following command:

git clone git@github.com:sbuckle/JIRA-Dashlet.git

The instructions for building and configuring the dashlet are in the README file. I have a couple of enhancements I want to make before the deadline but it works as is.

The dashlet currently uses the due date property of an issue to determine when issues are overdue etc. I had to configure my instance of JIRA to display the due date field when creating an issue as it didn’t appear originally in the create issue form; currently, if an issue has no due date it will only appear when “All Issues” is selected from the drop-down menu. It would be interesting to know if this field is actually used in the “real world” or whether it would be more useful to use other attributes like the time estimate fields instead.

The JIRA REST API appears to be quite limited in terms of what you can do with it, e.g. can’t create issues using the API. Also, the search pagination appears to be broken – at least I couldn’t get it to work – so I added my own.

In terms of other features, columns can be added/removed from the issues table depending on what the user wants to see; further columns may be added in the future. It’s also possible to sort by certain columns as well. Anyway, it is what it is for now.

Feel free to give some feedback/suggestions for enhancements etc by leaving a comment below.

  • Jvargas

    Hi Simon, do you have a screenshot of how it looks like?

  • http://www.simonbuckle.com/ Simon Buckle

    I’ve added some screenshots to the “screenshots” directory in the main project directory: https://github.com/sbuckle/JIRA-Dashlet

  • Luis Arteaga

    Hi Simon, this is a great idea for a dashlet and can be very useful, unfortunately I can’t make it work in my installation (Alfresco CE 4.0.d) Do I have to modify something? Jira version is fine and just confirm the REST interface. Also from what I read it works only with one user (username/pass in config file) I want to extend it to be configurable for each user to access their own jira tickets, I was reading at REST documentation and seems possible, can you give me a hint about how to achieve this?
    Thank you,
    Luis

  • Luis Arteaga

     Sorry, is working now, looks like I was missing a clean restart, but still I will work on the configurable part.
    Regards,
    L.

  • Rgovindsb

    I have configured the given information in Alfresco. But still it is not working. Is there any configuration required in JIRA side.

    gims

  • http://www.simonbuckle.com/ Simon Buckle

    There isn’t any explicit configuration required. You might want to check that the REST API is enabled. The username and password fields in the endpoint definition must correspond to those of a corresponding user in your JIRA instance. Also, make sure the endpoint URL is correct. Note that the dashlet only works with JIRA 4.2 and above.

  • Ramajogi

    Hi Simon Buckle, I am trying to use this dashlet in alfresco community 4.2 with JIRA5.0. When I hit the URL http://my-company.com/rest/api/latest/search in browser, I am receiving JSON response, but the same is not working when I configure it in the dashlet as explained above. The changes I made are:
    1. Changed the value of jiraUrl in jira-issues.get.config.xml to http://my-company.com
    2. Changed the value of endpoint-url in share-config-custom.xml to http://my-company.com/rest/api/latest/search
    3. Changed the userid and password to my JIRA account credentials

    The error details are attached as Image.
    our Am I missing anything else?
    Many thanks in advance for your help in this regard.

  • http://www.simonbuckle.com/ Simon Buckle

    The endpoint URL in your share-config-custom.xml is wrong. It should be: http://my-company.com/rest/api/latest

  • Ramajogi

    Thank you very much for your quick response. After I change the endpoint-url as siggested,it is now giving the following error. 
    2012-12-20 19:52:09,466  ERROR [freemarker.runtime] [http-bio-8080-exec-7] Template processing error: “Expected hash. issue.fields.summary evaluated instead to freemarker.template.SimpleScalar on line 9, column 24 in eu/webteq/modules/dashlets/jira-issues-search.get.json.ftl.” Expected hash. issue.fields.summary evaluated instead to freemarker.template.SimpleScalar on line 9, column 24 in eu/webteq/modules/dashlets/jira-issues-search.get.json.ftl.The problematic instruction:———-==> ${issue.fields.summary.value} escaped ${jsonUtils.encodeJSONString(issue.fields.summary.value)} [on line 9, column 22 in eu/webteq/modules/dashlets/jira-issues-search.get.json.ftl]———-Java backtrace for programmers:———-freemarker.template.TemplateException: Expected hash. issue.fields.summary evaluated instead to freemarker.template.SimpleScalar on line 9, column 24 in eu/webteq/modules/dashlets/jira-issues-search.get.json.ftl. at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:136)