There are three commands you can use in your commit message.
ISSUE_KEY #time <value>w <value>d <value>h <value>m <comment_string>
Records time tracking information against an issue. The value must be a whole number. For example:
This example records 1 week, 2 days, 4hours and 30 minutes against an issue, and adds the comment '
Total work logged' in the Work Log tab of the issue.
ISSUE_KEY #comment <comment_string>
Records a comment against an issue. For example:
Adds the comment "
corrected indent issue" to the issue.
ISSUE_KEY #<transition> <comment_string>
Transitions an issue to a particular workflow state. For example:
Executes the close issue workflow transition for an issue. This transition is in the default JIRA workflow. The directive also adds the comment '
Fixed this today' to the issue.
transitionvalues depend on a project's workflow configuration. To view a project's workflow, log into JIRA and do the following:
- Open an issue in the project.
- Locate the Status field in the Details section.
- Click the View Workflow link provided.
The smart commit works on the transition prefixes. This means if you have transition names with spaces, such as
finish work, then specifying
#finishis sufficient. Hyphens replace spaces:
Issue transitions work only if there is no ambiguity in valid workflow transitions. Suppose a workflow has two valid transitions:
A smart commit with action
#startis ambiguous because it could mean either of the two transitions. To execute one of these two transitions, fully qualify the transition you want by specifying either
A single action on a single issue
<ISSUE_KEY> #<CMD> <optional CMD_PARAMETERS>
Record 2 days and 5 hours of work against issue JRA-123:
JRA-123 #time 2d 5h
Multiple actions on a single issue
<ISSUE_KEY> #<CMD_1> <optional CMD1_PARAMETERS> #<CMD_2> <optional CMD2_PARAMETERS> ... #<CMD_n> <optional CMDn_PARAMETERS>Example:Log 2 days and 5 hours of work against issue JRA-123, add the comment 'Task completed ahead of schedule' and resolve the issue:JRA-123 #time 2d 5h #comment Task completed ahead of schedule #resolveAa single action on multiple issues<ISSUE_KEY1> <ISSUE_KEY2> <ISSUE_KEY3> #<CMD> <optional CMD_PARAMETERS> etcExample:Resolve issues JRA-123, JRA-234 and JRA-345:JRA-123 JRA-234 JRA-345 #resolve
Multiple actions on multiple issues
<ISSUE_KEY1> <ISSUE_KEY2> ... <ISSUE_KEYn> #<CMD_1> <optional CMD1_PARAMETERS> #<CMD_2> <optional CMD2_PARAMETERS> ... #<CMD_n> <optional CMDn_PARAMETERS>
Example: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.
JRA-123 JRA-234 JRA-345 #resolve #time 2d 5h #comment Task completed ahead of schedule