Show job description on the job details page
What does this MR do and why?
Shows the job description in the right sidebar of the job details page.
A job name is often too short to explain what a job is for. !268380 (merged) added the description keyword. !272225 (merged) added the jobDescription field to CiJob. This MR requests that field.
- The sidebar details block reads its values from the REST job, which does not carry the description.
sidebar_job_details_container.vueruns thegetJobquery forjobDescription. The page header already runs the same query with the same variables, so Apollo serves it from the cache. - The Description row shows in the details block at the top of the right sidebar. It comes right after the Queued row, and before the Timeout, Runner, and Source rows. Nothing renders when the job has no description, for example for jobs from archived pipelines.
- The job keyword docs now say where the description shows.
This MR targets the branch of !272225 (merged). GitLab retargets it to master when that MR merges.
I did not add a feature flag. The change only shows a value that users set themselves.
References
- Resolves #16481
- Depends on !272225 (merged)
Screenshots or screen recordings
| Before: job without a description | After: job with a description |
|---|---|
![]() |
![]() |
A description at the 128 character limit:
How to set up and validate locally
-
Commit a
.gitlab-ci.ymlwith job descriptions and run the pipeline. Thelong-descriptionjob uses the 128 character limit:rspec: script: echo description: Unit tests for the application rubocop: script: echo long-description: script: echo description: Runs the complete unit test suite for the application, including slow tests, and publishes the coverage report for every change. -
Open the
rspecjob page. The details block in the right sidebar shows a Description row withUnit tests for the application, after the Queued row and before the Timeout, Runner, and Source rows. -
Open the
rubocopjob page. The sidebar shows no Description row. -
Open the
long-descriptionjob page. The sidebar shows the full text.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
- Changelog: the commit has a
Changelog: addedtrailer. - Documentation:
doc/ci/yaml/_index.mdsays where the description shows. - Translation: the only new user-facing string is
Description, which uses the existing__()message. - Database: no migrations or queries.


