Wednesday, April 24, 2013

Mylyn tasks in Eclipse and viewing the Jira dashboard

In my previous post, I described how to connect Mylyn in Eclipse Indigo SR 2 to a Jira server. I will continue with creating Mylyn tasks in Eclipse, working with those tasks, Seeing the tasks using the Jira server through your browser, and finally, closing the task.

Creating tasks in Eclipse
First create a folder in Eclipse by right-clicking in the Mylyn "Task List" window and selecting New -> Category. I created a category called 1box.
Next, let's put a new task in the 1box category. Right-click in the Mylyn "Task List" window and selecting New -> Task. Then choose Box Jira (or whatever you called your repository). On the next screen, choose the appropriate project (I chose "1box (BOX)").

I filled in the task with some simple things. Note that the Estimate is 15m, for 15 minutes. The "Affects Versions," "Fix Versions," and "Components" depend on what your Jira administrators have set up. Finally, I assigned this to myself by clicking the icon at the far right of the text box.
After submit, notice the changes in the name (Jira appended "BOX-15") and that the Unsubmitted folder went away and that there's a new defect assigned to me.

Working with the task
You can activate the task in a couple of ways. You can click on the purple button next to the title ("Issue BOX-15"). Or you can right-click on BOX-15 and select Activate in the context menu. (If there are tabs from other files open, please right click on the task tab and then choose "Close Others" from the context menu.)
The context tells you what files you've viewed or changed. This is one of those features that make it a really helpful tool.
I selected the Context tab at the bottom and the Package Explorer tab at the left. My screen appeared as follows.
No files visible!?
When you start, you have an empty context. Hold down the Alt key and press on the "Empty Context" message. Instead of drilling down by pressing the black + on the left side of the project or folder, keep the Alt key pressed down and press on the blue + on the right edge of the name. Drill down until you find the file or files that you want to change. (I find this tedious. Better: Search for the file. Or if you looked at the file recently, choose Navigate -> Back. Or press the pull down next to the left-facing yellow arrow to see the last ten files. Or F3 on a resource that you'd like to open.)
As you open files, your context will grow. Only those files that you view will be visible in the package explorer.
Since Mylyn gives you just what you're working on for the task, it becomes a helpful mnemonic for what you worked on.

View from the Jira side
Jira is a way to view everybody's tasks and defects. I opened up a Firefox tab and went to, logging in with my corporate password. When I look on the summary tab, I see BOX-15 in several places.

I can start work on the task, assign it to someone else, add comments, or close it. If I change it on the Jira side, then I'll see it reflected in Eclipse/Mylyn fairly quickly.

The Atlassian products are already a joy to work with as an individual, but the team aspect adds a new dimension. Our department works across three time zones, and tracking tasks through email is difficult. With a Jira server and a Mylyn front end integrated into Eclipse, we're hoping to make it much easier to figure out who did what, to keep notes on what we did, and to figure out what files got touched.

We're only using a fraction of the Jira features, but the graphs are nice and they are helpful for getting the view from 20,000 feet.

Of course, it's also helpful for me to have a record of what I changed some months ago.

Closing the task
I can also close the task in Eclipse. But before I do, note that the two files that I touched are still open and that these are the only leaf nodes in the package explorer.

There you have it: Discovering Mylyn, getting Mylyn to talk to Jira, creating tasks in Mylyn. Happy team building.

Monday, April 22, 2013

Task management using Using Eclipse Mylyn as the front end and Jira as the back end

Eclipse has a task manager that comes standard with Indigo. It is called Mylyn.
Simplifies the view
(The origin of the word Mylyn is from myelin, a coating that surrounds your nerves, acts as insulation, avoids cross-talk, and speeds up the signal transmission speed.)
Instead of twenty files in as many tabs, Mylyn lets me focus on just those files associated with a given task. The files that you look at and change are called a context. I find it very helpful when I'm looking at a problem from some days (or weeks or months) ago. When I activate a task, Mylyn closes the existing context and opens up the requested one.
For a brand new task, there is no context. While you can use Alt-click to open the folders of the files you're looking for, I have found it helpful to open the file without an activated task, Activate the new task, and then use the back-arrow in Eclipse to bring it back into context.
(By the way, here is a tutorial that I wished I had seen earlier!)
Lets you keep track with notes and context
I copy both the error messages solutions and solutions into the task notes. Mylyn automatically keeps track of the files I view and change in the context. You can see all the files opened in the Package Explorer at the left, as well in the task's context tab.
Here's a view in local mode.
The local task that is open (far right) is "Create test records." The purple dot next to it indicates that this task is active. As you open files, only those files appear in the package explorer at the left. If you double-click on the task, you can add notes on the private tab. (You can also choose a priority and a due date.) If you select the Context tab (shown here), you will see which files were opened, even if you have closed the tab.
Local view is nice, but repository is better
My company uses Atlassian and makes it easy to set up a Jira repository.
As you can probably tell, I am quite fond of etymologies, and was surprised to find that Jira was not an acronym. Rather, it is derived from the Japanese name for the Godzilla, "Gojira." (ゴジラ).
Getting the connector
From the Eclipse menu, choose Help -> Eclipse Marketplace.
Linking to the repository
In Eclipse, please choose Window -> Show View -> Other. From the pop up, choose Mylyn -> Task Repositories. This will open a Task Repositories view at the bottom.
Right-click in the Task Repositories window, and choose JIRA (supports 3.13 and later). Then press the next button. For Server, I entered For Label, I entered "Box Jira." For user ID and password I entered my Ad-ent information. Then I validated it.
Mylyn can display tasks according to your preference. I used a predefined filter and chose 1box (my main project) and Assigned to me.
It's easy to set up this predefined filter even if you missed the dialogue box above. To do so,
  1. Go to Window -> Show view -> Task repositories
    1. (if you don't have Task repositories, go to Windows -> Show view -> Other... -> Mylyn -> Task Repositories)
  2. Right-click on your Jira repository (mine is Box Jira).
  3. Choose New Query from the context menu.
  4. See the "Edit query" popup from above and select "Assigned to me"
This will create a query with tasks assigned to you.
In the next post, I'll describe how to create tasks.