Wednesday, October 5, 2011

New Release - Grouping in timesheet - 1.0.1891

This release features grouping by various fields in the JIRA user's timesheet. Why is this important? Well, let's say you have a client who prefers you only work on critical/blocking issues because you're a superstar. This is an easy and quick way to make sure that you are adhering to this policy as much as possible.

So how does it work? It probably couldn't be simpler!

  1. Navigate to "Timesheet" tab
  2. Select a field in the "Group by" drop down

For example, I am grouping by "Status" here:

Screen Shot 2011 10 05 at 12 54 00 PM

This view is a good way to make sure I'm actually getting some work done!

Other changes in this release include a server-side plugin, a signed Windows/Mac installer and some bug fixes (grumble, grumble.)

Happy time tracking!

Sunday, September 4, 2011

Custom Actions - Exporting Worklogs (part 2 of 2)

In the previous post, I gave a couple of examples of customizing the Worklog Assistant context menu items to script actions for a given issue. In this post, I'm going to talk about how to export JIRA worklogs using the same functionality. Geek credentials are still recommended, by the way.

At the moment, Worklog Assistant only stores worklogs for the current user to simplify storage requirements. So when we are talking about exporting worklogs, we are talking about exporting them only for you.

The general algorithm for exporting worklogs goes is as follows:

script = getUserScript()
worklogs = getWorklogsForDisplayedPeriodInTimesheet()
for worklog in worklogs:
	if not worklogHasBeenExportedByScript(worklog,script):
		env = getEnvironment(worklog) # also issue

The key things about this algorithm:

  1. You have to choose the script you want to use.
  2. Worklogs are only exported for the displayed time period.
  3. A worklog is only exported if it has not already been exported by this script.

So let's define a custom script that creates a new file: ~/worklogs.csv. The script defined here will work on Mac and Linux so Windows users will have to translate. What we want to do is create a report that collects all our worklogs for a given time period.

The script itself is quite simple and is shown below:

if [ ! -f ~/worklogs.csv ]; then
echo "Key,Summary,Start date,Time spent (seconds)" > ~/worklogs.csv

cat >> ~/worklogs.csv << END_WORKLOGS

If we add this to our custom script configuration, this time changing the type to "Worklog Export", it should look something like this. I named it "Export to CSV":

Screen Shot 2011 09 04 at 11 14 30 PM

To use this new script:

  1. Navigate to the "Timesheet" tab.
  2. [Optional] Import -> Import Worklogs. I like to use the query "jql: updated >= -4w" to make sure I have the latest data.
  3. Export -> Export worklogs using custom scripts
  4. Choose "Export to CSV"

Your file will be located at ~/worklogs.csv. Open it now. You should see all the worklogs for the issues you worked on that week, along with the worklog comments.

Try exporting and reopening the file again. You will notice that the file has not changed. This is deliberate. When Worklog Assistant exports a worklog, a note is made that the worklog has been exported. This way, if you are exporting worklogs for reporting purposes, you do not need to worry about accidentally including double entries.

If you would like to delete the notes on exported worklogs, navigate to:

  • Windows: %APPDATA%\Worklog Assistant for JIRA
  • Mac: ~/Library/Preferences/Application Support/Worklog Assistant for JIRA
  • Linux: ~/.config/Somani Software/Worklog Assistant for JIRA

Then, navigate to the "Exported Worklogs" directory and delete the "Export to CSV" folder. That will get rid of the notes and you can run the script again.

Just as before, there are a set of available fields for each worklog. For convenience, I've included the list as well as example values below.


JIRA_Created='Tue Dec 30 17:56:26 2008'












JIRA_Status='In Progress'


JIRA_Time_spent='40h 1m'


JIRA_Updated='Sun Sep 4 23:15:24 2011'




JIRA_WorklogCreated='Sun Sep 4 12:27:55 2011'





JIRA_WorklogStartDate='Sun Sep 4 11:28:08 2011'


JIRA_WorklogTimeSpent='1 hour'



JIRA_WorklogUpdated='Sun Sep 4 12:27:55 2011'

That's all for custom scripts for now! Please feel free to contact me at or comment below if you have any questions!

Custom Actions - Adding Menu Actions (part 1 of 2)

A recent update of Worklog Assistant added the ability to export your JIRA worklogs using a custom script. The documentation however, is a bit terse. If you are interested in extending Worklog Assistant generally, this will give you a good introduction. You must speak geek to read this blog post. If you cannot speak geek, find a geek. If you cannot find a geek, try and follow along anyway :)
You have been warned.

Custom Scripts

Custom scripts in Worklog Assistant are a set of commands interpreted by your computer to accomplish some goal. The general workflow of a custom script is:
  • Workog Assistant sets up a bunch of environment variables depending on the task you're trying to accomplish.
  • Your script is called using the operating system's command interpreter.
  • If your script returns with a non-zero exit code, Worklog Assistant assumes that the script failed.
As of this writing, there are two extension points to Worklog Assistant:
  • Menu actions.
  • Worklog export.
Both of these utilize the same one-way workflow as above. Let's try a simple example where we add a menu action.

Adding Menu Actions

  1. Go to Worklog Assistant's configuration dialog (⌘+, on Mac, Application->Configuration otherwise).
  2. Choose the "Custom Scripts" tab and click "Add". Mine is pictured below:Screen Shot 2011 09 04 at 12 08 30 PM
  3. Select the "New script" entry and change the text in the Description field to "Hello World"
  4. Leave the "Type" as "Context Menu"
  5. Type in the following in the "Script" section:
    • Windows: echo Hello World  %JIRA_Summary% && exit 1
    • Mac/Linux: echo "Hello World ${JIRA_Summary}" && exit 1
    • It should now look like the followingScreen Shot 2011 09 04 at 12 42 30 PM
  6. Click "Save"
Now when you right-click any issue, you should see a "Custom" entry as shown below:
Screen Shot 2011 09 04 at 12 19 41 PM
If you then click on the "Hello World" entry, you should see the following dialog:
Screen Shot 2011 09 04 at 12 43 48 PM
And there you have it! You have created a custom menu action. To find out all the variables that are available to you, you can use the following custom script:
  • Windows: (set | findstr JIRA_) && exit 1
  • Mac/Linux: (set | grep JIRA_) && exit 1
Let's make use of this information to open a Google search. This example will run only on Mac but you should be able to follow along on Windows and Ubuntu as well.
Change the "Hello World" script to the following:
open "${JIRA_Summary}&sclient=psy&hl=en&noj=1&site=webhp&source=hp"
This script searches Google for the summary of your JIRA issue when clicked! Note that I did not include the "exit 1" because I don't want Worklog Assistant to assume the custom script failed.
In the next part, I'll talk about utilizing the same custom scripts workflow to export your JIRA time tracking information.
Update: For convenience, I've included the main environment variables below along with sample output. The full list can be found here.
JIRA_Created='Tue Dec 30 17:56:26 2008'
JIRA_Status='In Progress'
JIRA_Time_spent='36h 50m'
JIRA_Updated='Sun Sep 4 15:39:52 2011'

Sunday, July 31, 2011

Guest post on Atlassian

Readers of this blog may be interested in a guest post I made on the Atlassian blog. It was great working with the Atlassian team (thanks to Alex and Kyle especially) and I hope we can work together again!

I was also very happy that we did not have to send Microsoft Word documents back and forth.

Sunday, April 24, 2011

Is Atlassian becoming an Open Source company?

[There is an update, see end of post]

Short answer: No, but read on :)

I've been playing with the latest Atlassian Plugin SDK and I was finding the tutorials lacking in something I wanted to do.

So I looked at the JIRA source to see how they did something similar. Yep, you read that right: I looked into the source of the crown jewels of of a multi-million dollar software company

How is this possible?

Use the source, Luke.

A couple of years back, JIRA used to come in multiple editions of which only one, the enterprise edition, allowed you to view and compile the source code. Now, there is only one edition and it includes the source code.

Essentially, for $10, you now have access to the source code for JIRA. Now, it is not entirely open source in that you cannot redistribute it yourself, but it is something that helps their users which is a major stated goal of open source software.

Why would they do this?

Redhat is a billion dollar (almost) company and they sell open source software. IBM sells consulting services related to open source software. Microsoft is coming into the fold, kicking and screaming, perhaps throwing chairs, but I modify some of their open source stuff.

In short: keeping the source code for JIRA completely proprietary is probably not that important for these guys. Controlling the distribution and trademark is, however. You can see that with Redhat vs CentOS as well.

Why does this matter?

Instead of giving up and/or cursing the tutorials, I was able to solve the problem on my own. This means a healthier ecosystem for JIRA as more people will become familiar with how things work rather than waiting for a tutorial on "how to do X with the JIRA SDK".

So hats off to the Atlassian guys for taking a well-calculated risk that not many other companies would try.

Back to playing with the SDK.

Update: I took a look at the source license and it's not clear to me whether you can learn from the source code to use in plugins so just be aware that this may not be a kosher way to go.

Update 2: Jonathan, from Atlassian, has confirmed that it is fine to use the source code in this manner. Thanks Jonathan!

Monday, March 21, 2011

New release - Worklog export - 1.0.1784

This release features a "Worklog Export" feature along with other changes. There are two ways to export your JIRA worklogs:

  1. Use the built-in HTML export
  2. Write a custom script

You might want to use the HTML export if you need to send it to someone else. Alternatively, you could use the custom script capability

You can find the export in the "Timesheet" tab in the drop-down button:

Custom export scripts can be added in the configuration as shown here:

There are a few more functional changes, check the release notes for those.

Happy time tracking and have a good week!

Friday, February 11, 2011

Video: JIRA with an IT Consultant

Gregory Kneller, whom I have enjoyed working with on various things regarding JIRA time tracking with Worklog Assistant, presented a case-study with Atlassian about using JIRA for solving general business problems.

Among the things considered:

  • Sharing documents
  • Time tracking
  • Dashboards

One of the things I found most interesting was how Gregory managed to make JIRA match the nomenclature of the domain in which he was working. For example, "Issues" became "Projects". Another very interesting aspect was his presentation of worklogs as a "ship log" or a kind of journal. I also use worklogs in the same manner and I'm happy to see that others do as well!

I'm not sure if the slides are available for a quick review, but I'd recommend even a quick run-through of the video. You might get some new ideas.

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