Jira: Creating a custom description template

Thursday, April 1, 2010

It’s hard work getting your team to enter bugs/issues into your issue tracker (“can’t I could just email you?”), and it’s even more difficult getting them to provide enough description to make the issue summary helpful. As the person who’s job it is to report issues to you, they need to “transfer context”. They know this bug intimately, either because they found it themselves or a customer/user reported it to them.

You – our heroic developer – don’t know anything about the issue. They want you to fix it quickly, and you want to fix it quickly… so why is it so damn hard to get them to understand that the more detail they provide, the faster you both get what you want?

I don’t have any good answers to that question, but I’m hoping this tip can help you incent them to give you more of what you need.

Editing the Description textarea

Often, you want users to enter the following:

  1. a link to the page that’s causing troubles
  2. relevant IDs (order ID, for example)
  3. a description of the behavior they expected
  4. a description of the actions they took that resulted in the unexpected behavior

Here’s what my description template looks like:


You probably have others. To Pre-populate your with a customized template:

  1. Navigate to your jira install directory. Drill down to WEB-INF\classes\templates\jira\issue\field
  2. Save a copy of description-edit.vm (to be safe)
  3. Edit description-edit.vm, like so:
#controlHeader ($action $field.id $i18n.getText($field.nameKey) $fieldLayoutItem.required $displayParameters.get('noHeader'))

## setup some additional parameters
$!rendererParams.put("rows", "12")
$!rendererParams.put("wrap", "virtual")

## marc's custom hoogie
#macro( setDescription )
-- All your custom stuff goes here --
SYSTEM: Dev  |  Test   |   Staging |  PROD




-- your custom stuff ends here --

## let the renderer display the edit component

#if ($description=="" || !$description)
#set ($description = "#setDescription()")

$rendererDescriptor.getEditVM($!description, $!issue.key, $!fieldLayoutItem.rendererType, $!field.id, $!field.name, $rendererParams, false)

#controlFooter ($action $fieldLayoutItem.getFieldDescription() $displayParameters.get('noHeader'))

Restart Jira

That’s it!

You can read more about customizing Jira templates here.

1 comment:

Shawn said...
This comment has been removed by a blog administrator.