Statuses from pull requests
Let an issue’s status follow its branch and pull request, with other rules for release branches.
Once a project has a repository, nobody has to move its issues by hand: an issue’s status follows what happens to its branch and its pull requests.
Link pull requests to issues
A pull request is linked to an issue when the issue’s id, like PAY-12, is in its branch name, its title or its description. Copy git branch name on an issue gives a branch name that already carries the id.
You can also link a pull request by hand: on the issue, under Pull requests, press Link pull request and paste its address.
Each link says how the pull request relates to the issue:
- Closes the issue: merging it finishes the issue.
- Part of the issue: one of several pull requests the issue needs.
- Related: linked for reference.
The rules
In the project’s settings, open Repositories. Under Automation, choose a status for each event, or Don’t move.
| Event | When it happens |
|---|---|
| Branch name copied | Someone copies the issue’s branch name. The issue is also assigned to them if it had no assignee. |
| Draft opened | A draft pull request or merge request is opened. |
| Opened for review | A pull request is opened ready for review, or a draft is marked ready. |
| Review requested | A review is requested or submitted. |
| Merged | All of the issue’s closing pull requests are merged. |
| Closed without merging | All of the issue’s pull requests are closed unmerged. |
| Agent started | A coding agent the issue was delegated to started on it. |
| Agent’s draft opened | A coding agent opened its draft pull request. |
Issues move forward only, never back: an issue that is already in review doesn’t return to an earlier status because someone opened one more draft.
Other rules for some branches
Often a merge means different things for different branches: merged into main is “done”, merged into a release branch is “released”.
Under Branch rules, add a branch and change the events that should work differently for pull requests into it. A * stands for any characters, so release/* matches release/2.4 and release/hotfix. Events you don’t change work as in the default rules.
What you see on the issue
The issue’s activity records each move with its reason, for example that it went to In Review because a review was requested on a pull request. The pull request’s page says in advance where the issue goes once it is merged.