At Atlassian, all developers end up doing a 2 week support rotation every now and then. It’s a great opportunity to see first hand how all the buggy code I write as a developer ends up hurting customers and will hopefully provide an incentive to write less buggy code in the future ;). It is also a good time to come up with innovative little patches that help customers in the short-term, which can then be fed back into the product in the long run. This blog is about one such case.
Read on for a one file solution to this problem.
The JSP is simply this:
The JSP, checks if the user is authenticated first (and if not displays an alert and a link to the login page) then tries to fetch all the gadgets for the dashboard with the id provided. It then displays the gadgets as a list of links that will open up in a new window.
Just in case anyone’s wondering: The main reason why gadget URLs can’t just be bookmarked in the first place is because a gadget’s render URL contains a security token that expires (after 1 hour) after which the gadget wont render any longer.
With the JSP above, users can bookmark a URL on their phones such as http://localhost:2990/jira/gadgets.jsp?d=10000 (where 10000 is the dashboard id) which will then provide them with a list of all the gadgets on that dashboard:
It’s not pretty, but if all you’re after is performance than this little hack works great. It’s certainly something I’ll be looking at integrating into my 20% time project, the Jira iPhone web-interface (along with some improvements; iGoogle have a very nice mobile version of their dashboard and gadgets).