This service hook allows you to update JIRA tickets from commit messages. To interact with tickets in JIRA you will need to place special markup in your commit message in the format of:

    ISSUE-KEY #<action>:<target> <value>

Example:

    DEV-123 Fixed an annoying bug #set:transition Done #add:comment Needs review #add:time 1d 4h 5m Completed before deadline

This will perform transition **Done** with **Needs review** comment on the issue **DEV-123**. It will also log **1d 4h 5m** spent on this issue with a **Completed before deadline** worklog comment.

Available markups (target - action)
-----------------------------------

* versions - add/set/remove
* comment - add
* components - add/set/remove
* fix_versions - add/set/remove
* labels - add/set/remove
* time - add
* assignee - set
* description - set
* priority - set
* reporter - set
* summary - set
* transition set
* resolution - set

*The assignee and reporter markups can be set to **username**, **email** or **display name** for JIRA Server and to **email** or **display name** for JIRA Cloud.*


This service also allows you to use *JIRA Smart Commits* shortcuts listed below
-----------------------------------

* comment
* time
* transition (proper name of transition, like #done, #to-do..)

Example:

    JR-456 #to-do #comment Still not working #time 1d 4.5h 10m It takes too much time!

This will perform transition **To Do** with **Still not working** comment on the issue **JR-456**. It will also log **1d 4.5h 10m** spent on this issue with a **It takes too much time!** worklog comment.

Install Notes
-------------

Version 2 of JIRA REST API is required. A user in JIRA will need to be created for P4 DAM. It should be given full
access to all projects. In order to update fields, they must be associated to a screen in JIRA.

Example configuration for JIRA Server

* **Server url**: https://myjira.example.com
* **Username**: (username of the JIRA user)
* **Password**: (password of the JIRA user)

Example configuration for JIRA Cloud

* **Server url**: https://myjira.atlassian.net
* **Username**: (email of the JIRA user)
* **Password**: (api token of the JIRA user)
