quant
quant

Reputation: 4482

can you reference a task from an issue in a commit?

I have an issue on gitlab, #1. This issue when it was created it contained two tasks.

Is there a way to mention/reference/close one of the two tasks in a git commit ?

Upvotes: 5

Views: 1413

Answers (2)

VonC
VonC

Reputation: 1323065

June 2023: Yes with GitLab 16.1

See issue 396553 and documentation:

https://gitlab.com/gitlab-org/gitlab/uploads/5fd3ee99e63627358d17dbb970836908/Screenshot_2023-05-18_at_10.13.32_AM.png

To refer to a task elsewhere in GitLab, you can use its full URL or a short reference, which looks like namespace/project-name#123, where namespace is either a group or a username.


Aug. 2022: Not yet, but at least you can define tasks in an issue now.
This comes with GitLab 15.3 (Aug. 2022)

Create tasks in issues

Tasks provide a robust way to refine an issue into smaller, discrete work units.

Previously in GitLab, you could break down an issue into smaller parts using markdown checklists within the description.
However, these checklist items could not be easily assigned, labeled, or managed anywhere outside of the description field.

You can now create tasks within issues from the Child Items widget.
Then, you can open the task directly within the issue to quickly update the title, set the weight, or add a description.

Tasks break down work within projects for GitLab Free and increase the planning hierarchy for our GitLab Premium customers to three levels (epic, issue, and task).

In our next iteration, you will be able to add labels, milestones, and iterations to each task.

Tasks represent our first step toward evolving issues, epics, incidents, requirements, and test cases to work items.
If you have feedback or suggestions about tasks, please comment on this issue.

https://about.gitlab.com/images/15_3/create-tasks.gif

See Documentation and Epic.

Upvotes: 1

ddotsdot
ddotsdot

Reputation: 303

Yes you can!

As of GitLab 16.1. you can at least mention/reference individual tasks via commit msg.

The general syntax for this is namespace/project-name#123 where namespace is either a group or a username and #123 is the ID of your task.

See the docs.

Upvotes: 2

Related Questions