Add due date to vulnerability details sidebar
What does this MR do and why?
Adds a Due date section to the vulnerability details page sidebar, behind the vulnerability_due_date_ui feature flag (gitlab_com_derisk, default off, project actor).
Due dates can already be set through the API (bulkSetVulnerabilityFindingsDueDates) and read from Vulnerability.dueDate, but nothing in the UI shows or edits them. With this MR:
- The sidebar shows the finding's due date, or None, under Severity.
- While the vulnerability is open (
detectedorconfirmed), the date uses the same overdue and due-soon treatment as work items (getDueDateStatus): thecalendar-overdueorcalendar-dueicon plus an(overdue)or(due soon)label. Resolved and dismissed vulnerabilities always show the neutral calendar. - Users with
admin_vulnerabilityget an Edit action that shows a datepicker, which turns into Apply while editing (the same pattern as work item dates). Apply, Esc, or a click outside the section saves: it sets the date, or removes it when cleared, by calling the existing mutation with the finding UUID. Success shows a toast. Mutationerrorsor a failed request show an alert and keep the form open.
Data follows the page's HAML → GraphQL migration contract (https://gitlab.com/gitlab-org/gitlab/-/work_items/601897): due_date is added to the helper payload, mapped in the fromHaml adapter, and selected in vulnerability_details.query.graphql. The frontend fixture now carries a due date, so the adapter contract spec covers it.
Out of scope, for follow-ups: due dates in the vulnerability report, filtering, bulk editing, and an activity or system note when a due date changes (the service does not create notes today).
References
- Epic: gitlab-org#19275
- Backend: #592225 (closed) (mutation), #592229 (closed) (GraphQL query exposure)
- HAML to GraphQL migration of the details page: https://gitlab.com/gitlab-org/gitlab/-/work_items/601897
- Feature flag rollout: #637058 (closed)
Screenshots or screen recordings
Verified locally in GDK against gitlab-org/gitlab vulnerabilities, as a project maintainer.
| State | Screenshot |
|---|---|
| No due date | ![]() |
| Editing (Edit becomes Apply) | ![]() |
| Due soon (Nov 3, today Oct 29), after reload | ![]() |
| Overdue (Oct 20) | ![]() |
| Removed, with toast | ![]() |
| Flag disabled (vulnerability still has a due date) | ![]() |
I also checked that the database row and Vulnerability.dueDate over GraphQL matched each change (2026-11-03 after setting, null after removal), and that there were no browser console errors.
How to set up and validate locally
-
In the Rails console, enable the feature flag:
Feature.enable(:vulnerability_due_date_ui) -
As a user with at least the Maintainer role (or another role with
admin_vulnerability), open any vulnerability, for examplehttp://127.0.0.1:3000/gitlab-org/gitlab/-/security/vulnerabilities/<id>. -
In the sidebar under Severity, the Due date section shows None. Select Edit, pick a date, and select Apply (or press Esc, or click outside the section).
-
Reload the page. The date persists. A past date shows (overdue); a date within the next 7 days shows (due soon).
-
Select Edit, clear the date with the clear button, and select Apply. The section shows None again.
-
As a Developer, the section is read-only (no Edit).
-
Disable the flag. The section is no longer rendered.
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.
- No changelog entry: the feature is behind a default-off flag. A changelog and user docs will come with the rollout.
- No database or permission changes: this reuses the existing mutation and its
admin_vulnerabilityauthorization.





