JIRA Studio Documentation

Index
Downloads (PDF, HTML & XML formats)

(warning) Deprecation Notice: JIRA Studio is being phased out with the introduction of the Atlassian OnDemand suite of hosted services. Please see our FAQ for existing customers. For documentation on Atlassian OnDemand, please go to: Atlassian OnDemand.

Skip to end of metadata
Go to start of metadata

If you are working with code, you can action issues in JIRA Studio via Subversion commit messages. By using particular keywords in your commit message, you can log work, add comments or change the status of an issue. This makes it easy for you to maintain any issues that are related to the code you are changing.

Basic command line syntax

Actioning Issues via Commit Messages

 

The basic command line syntax for your commit comment is:
<ISSUE_KEY> #<COMMAND> <optional COMMAND_PARAMETERS>

For example, if you include the following text in your commit message, JIRA Studio will record 2 days and 5 hours of work against issue JRA-123, when you perform your commit:
JRA-123 #time 2d 5h

(info) Please see the section on commit commands below for further information on the command line parameters.

Advanced command line syntax

 

If you wish to perform multiple actions on issues, you can create composite commands by combining keywords, as described below.

  • To perform multiple actions on a single issue:
    <ISSUE_KEY> #<COMMAND1> <optional COMMAND1_PARAMETERS> #<COMMAND2> <optional COMMAND2_PARAMETERS> #<COMMAND3> <optional COMMAND3_PARAMETERS> etc
     
    For example, if you include the following text in your commit message, JIRA Studio will log 2 days and 5 hours of work against issue JRA-123, add the comment 'Task completed ahead of schedule' and resolve the issue, when you perform your commit:
    JRA-123 #time 2d 5h #comment Task completed ahead of schedule #resolve
  • To perform a single action on multiple issues:
    <ISSUE_KEY1> <ISSUE_KEY2> <ISSUE_KEY3> #<COMMAND> <optional COMMAND_PARAMETERS> etc
     
    For example, if you include the following text in your commit message, JIRA Studio will resolve issues JRA-123, JRA-234 and JRA-345, when you perform your commit:
    JRA-123 JRA-234 JRA-345 #resolve
  • To perform multiple actions on multiple issues:
    <ISSUE_KEY1> <ISSUE_KEY2> <ISSUE_KEY3> #<COMMAND1> <optional COMMAND1_PARAMETERS> #<COMMAND2> <optional COMMAND2_PARAMETERS> #<COMMAND3> <optional COMMAND3_PARAMETERS> etc.
     
    For example, if you include the following text in your commit message, JIRA Studio will log 2 days and 5 hours of work against issues JRA-123, JRA-234 and JRA-345, add the comment 'Task completed ahead of schedule' to all three issues, and resolve all three issues, when you perform your commit:
    JRA-123 JRA-234 JRA-345 #resolve #time 2d 5h #comment Task completed ahead of schedule

(info) Please see the section on commit commands below for further information on the command line parameters.

The commit message syntax allows you to do even more complicated actions, than the examples described above. If you would like to view the formal syntax for the commit message definition, it is available on this FAQ

Commit commands

 

Command

Command Parameters

Description

Example

#time

<n>w <n>d <n>h <n>m <work log comment>
where <n> is a user-specified time period.

This command records time tracking information against an issue.
(info) Please note, time tracking must be enabled for your JIRA Studio instance to use this command. Please check with your JIRA Studio administrator, if you cannot record time tracking information against issues.

#time 1w 2d 4h 30m Total work logged — this command would record 1 week, 2 days, 4hours and 30 minutes against an issue, and add the comment 'Total work logged' in the Work Log tab of the issue.

 

#comment

<comment text>

This command records a comment against an issue.

#comment My comment. — this command would create the comment, "My comment", against the issue.

#<workflow command>
e.g. #resolve

<resolution> <comment text>
where <resolution> is an optional case-insensitive, resolution status, e.g. 'fixed', 'won't fix'.

This command transitions an issue to a particular workflow state.

The default JIRA workflow transitions are mapped to the following commit commands with equivalent names:

  • Start Progress — #start
  • Stop Progress — #stop
  • Close Issue — #close
  • Resolve Issue — #resolve
  • Re-open Issue — #reopen

(info) Please note, your JIRA Studio administrator may have set up a custom workflow or changed the default commit command for a particular transition. Please check with your JIRA Studio administrator for the commit commands available for you to use.

#close fixed Fixed the issue — this command would execute the 'Close Issue' workflow transition for an issue in the default JIRA workflow, setting the resolution status to fixed, and adding the comment 'Fixed the issue'.
#start — this command would execute the 'Start Progress' workflow transition for an issue in the default JIRA workflow

Error handling

 

If you have specified a commit command incorrectly, your code changes will still be committed to the repository. However, the associated JIRA issue action(s) will not be executed and you will be notified via email.

Possible commit command errors include:

  • Issue key not found
  • Workflow command not found, or not available for current status
  • No valid parameters are specified for a command that requires parameters
  • You do not have permissions to perform the specified action in JIRA, e.g. issue may be restricted by permissions
  1. May 31, 2010

    Anonymous

    This special comments are only available in the JIRA STUDIO, or other versions of JIRA has these features. ?

    1. Jul 05, 2010

      This feature is part of JIRA Studio, but it is possible (though not officially supported) to set this up in your own standalone instances of JIRA and FishEye.

      The instructions were written by James Roper in our developer blog.

  2. Jun 29, 2010

    Should mention that these commands only work when the issue has been assigned to you. Don't know if that's a bug or a feature...

    1. Jul 05, 2010

      Eric, that's not necessarily the case. It should work for any issue that you have permissions on to perform the actions you specify. Could it be that the permission scheme used on your project is configured to only allow assignees to resolve issues?

      1. Jul 06, 2010

        We're using the "Default Permission Scheme", which allows a developer to resolve an issue without having it assigned first. Should I open an issue for that?

        1. Jul 07, 2010

          Yes, please open one at https://support.atlassian.com/browse/JST with your instance details.

          1. Jul 08, 2010

            Upon further investigation it turns out that #resolve works, but #start (which requires the issue to be assigned first) doesn't.

            So I guess what I'm really asking for is an option to assign issues automatically when processing commit messages: https://studio.atlassian.com/browse/JST-2614

            1. Jul 08, 2010

              Great idea!

  3. Aug 24, 2010

    Anonymous

    Is there any way to set custom fields using commit messages?

  4. Jan 12, 2011

    We generally change the assignment of the issue to the raiser upon resolution.  Could we add an assignee to the #resolve syntax?

    The advantage to this is that the raiser sees the resolution comments in their email notification that they are now responsible for testing/acceptance of the fix.

  5. Jan 27, 2011

    Anonymous

    Does it works if Subversion repository(where commit happens) and Issues(actioning with) are belong to different projects?

  6. Apr 06, 2011

    Is this procedure to get Actionable Commit messages still necessary in Jira 4.3 and Fisheye 2.5?

    I have just finished the dragonslayer and have purchased the startup licenses in order to replace our inhouse Mantis system.  This is a key feature for us, being able to change issue status from svn commits and seems like something that fisheye might already do since it is parsing the commits.

    Does this procedure still have to be set up as mentioned above in order to get actionable commits like:

    SANDBOX-6 #resolve #comment This was a simple issue to resolve

    Thanks.