Jira-related Operations
Matching Work Items
You can customize rules for matching Jira work items using regular expressions.
Jira Work Item Regex: Enter a regular expression to match Jira work item keywords. The regular expression must adhere to the RE2 syntax. If left empty, the default rule ([A-Z][A-Z_0-9]+-\d+) will be used.
Jira Work Item Prefix: Enter a prefix to match Jira work items.
Transition to Done
When Transition to Done is selected, you can transition a referenced Jira work item to the done state.
- Select Enable Jira Status Transition by referring to Configuring a Trigger.
- Use either of the following methods to transition a referenced Jira work item to the done state:
- Include a Jira work item ID alongside keywords such as fix, fixed, resolve, resolved, or close in the commit message to automatically transition the work item to done upon commit.
Example: A commit message like fix SCRUM-1 will automatically transition work item SCRUM-1 to done after submission.
- Merging or closing a merge request that references a work item will transition it to done.
- Include a Jira work item ID alongside keywords such as fix, fixed, resolve, resolved, or close in the commit message to automatically transition the work item to done upon commit.
Transitioning Statuses Using Custom Transition IDs
When Use Custom Transition is selected, you can transition a referenced Jira work item to a custom state using a transition ID.
- Obtain transition IDs.
- For Jira Cloud users, obtain transition IDs by editing a workflow in the Text view. The transition ID is displayed in the Transitions column.
- For Jira Server users, obtain translation IDs in one of the following ways:
- Use the API, with a request like https://yourcompany.atlassian.net/rest/api/2/issue/ISSUE-123/transitions, to access a work item in the appropriate "open" state.
- Hover over the link for the desired transition and look for the action parameter in the URL.
- Select Enable Jira Status Transition by referring to Configuring a Trigger.
- Select Use Custom Transition and enter the transition ID to set the final state.
- Use either of the following methods to transition a referenced Jira work item to a custom state:
- Include a Jira work item ID alongside keywords such as fix, fixed, resolve, resolved, or close in the commit message to automatically transition the work item to a custom state upon commit.
Example: A commit message like fix SCRUM-1 will automatically transition work item SCRUM-1 to a custom state after submission.
- Merging or closing a merge request that references a work item will transition it to a custom state.
- Include a Jira work item ID alongside keywords such as fix, fixed, resolve, resolved, or close in the commit message to automatically transition the work item to a custom state upon commit.
- If multiple transition IDs are specified, which are separated by commas (,), work items will be transitioned according to the involved IDs. If a transition fails, the execution sequence stops.
Example: Work item 1 includes transition ID 41 in its workflow, and work item 2 includes transition ID 181. If the custom transition IDs are set to 41 and 181, submitting or merging code or closing a merge request will transition work item 1 to status 41 and work item 2 to status 181.
Associating Jira Work Items When Creating Branches
- Go to the repository list and click a repository name to access the repository details page.
- Choose Code > Branches. The branch list page is displayed.
- Click Create Branch. In the displayed dialog box, select the branch or tag based on which the new branch is created, or enter a commit ID to create a branch based on the ID.
- Enter a branch name. If the branch name includes a Jira work item ID (e.g., SCRUM-1), the branch is automatically associated to the work item.
The name cannot be the same as another branch or tag name.
- Alternatively, under Associate Jira Work Items, search for the desired Jira work item by keyword in the drop-down list, and select it.
- After the association is successful, click OK.
Associating Jira Work Items with Merge Requests
- Go to the repository list and click a repository name to access the repository details page.
- On the Merge Requests tab, click Create Merge Request.
- Specify the source branch and target branch.
- In the basic information area, enter the title and description for the merge request. If the description includes a Jira work item ID (e.g., SCRUM-1), the merge request automatically is associated with the work item.
- Alternatively, under Associate Jira Work Items, search for the desired Jira work item by keyword in the drop-down list, and select it.
- After the association is successful, click OK.
Associating Commits with Jira Work Items
- Go to the repository list and click a repository name to access the repository details page.
- On the Code tab, click Create and choose Create File from the drop-down list.
- Specify the following information and retain the default values for other parameters.
- File name: user-defined file name, for example, Sample_Code.
- File content: user-defined file content.
- Commit message: Include a Jira work item ID (e.g., SCRUM-1) to complete the association.
- Click OK.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot