Sunday, August 18, 2013

New release - Upgrade recommended

Version 1.0.130817-r24dc is available. Sexy version number, eh?
This is a bug fix release only but I recommend that you upgrade if you've been having issues with weird timeouts with JIRA OnDemand.

If for nothing, do it to compensate me for the 3 hours testing cycle for each attempt at a fix. Yes, it took 3 hours to reproduce the issue each time and took me 3 or 4 weeks before I could even reproduce it reliably thanks to a lucky email from a customer that triggered a new approach.

I can unequivocally state that I have the best group of customers in the entire software business who are so willing to help test fixes like this with the patience of a ninja assassin. For all of you, I present you with the Ninja Assassin Patience Customer Prize:


As always, feel free to contact me if you have any questions, comments or suggestions.

Tuesday, January 15, 2013

Logging time to sub-tasks only in JIRA using custom scripts

Hello and welcome to another edition of "Stuff you didn't know you could do with Worklog Assistant."

As referenced in a previous post, custom scripts are a nifty way to extend Worklog Assistant to perform issue-specific housekeeping tasks.

For example, I use custom scripts to create and merge branches for a given issue. This is done through a "Context menu" script which allows me to add custom commands to any issue:



One of the recent additions to Worklog Assistant are a couple of new of "hooks" (in the Emacs parlance) or "extension points" (in Eclipse-speak).

The new hooks (can you guess what editor I use?) allow you to run a script when you toggle the timer on an issue and/or run a script once a minute.

People are already using them! Michael van Engelshoven was kind enough to share that he uses the new functionality to generate a git commit template:
With the output looking something like this:
But that's not all! As the title of this post suggests, it is possible to use custom scripts to prevent yourself from accidentally logging work on issues that you should not log work on. For example, against issues that are not assigned to you. In this case, I will show an example of how you can generate an informative message when you unintentionally start logging work against a sub-task.

So a quick review:
  • Custom scripts work by executing platform-native scripts
  • Custom scripts are executed in response to different user interaction (none, explicit, implicit, etc)
  • All properties of the current issue are exposed through environment variables. For example, the summary field of an issue is exposed as the variable JIRA_Summary
  • Scripts that have a non-zero exit code are assumed to have failed and the user is notified.
Putting these together, we might guess as to how to prevent a user from tracking against an issue that is not a sub-task:
  • Create an "Issue Timer Toggle" custom script (the name is horrible, sorry)
  • Detect if the issue is a sub-task
  • If not, the script should fail with an error message
And that is exactly what is done here:


The script is specific to Windows but it can easily be modified for other platforms:

@ECHO OFF
if "%JIRA_IsSubtask%" == "0" (
  echo ---------------------------
  echo %JIRA_Key% is not a sub-task!
  echo ---------------------------
  echo Please choose a sub-task
  exit 1
)

When I toggle a timer on an issue that is not a sub-task, I am greeted by this message, fully customized by you!

This wraps up another edition of "Cats riding invisible bikes" "Stuff you didn't know you could do with Worklog Assistant." To find out more, check out the documentation on custom scripts. As always, have a nice day and feel free to contact me with any questions, comments or suggestions!

No post is complete without a funny picture of a cat so here is a coder cat:



About this blog

We strongly believe that tracking your time properly is the first step to deterministic software development. If you feel that you have been guessing or you can't be bothered to remember to log time, Worklog Assistant might be for you!

Give it a try!

Please download a free 30-day trial today by clicking on the link below: Download