diff --git a/app/models/vulnerability.rb b/app/models/vulnerability.rb index a9e1b2dbc5b34ef4374dca39e8ad8863a4feb8ce..702e7fce567e7fb0fd99e4d847da65ff409b5a0c 100644 --- a/app/models/vulnerability.rb +++ b/app/models/vulnerability.rb @@ -5,7 +5,9 @@ class Vulnerability < ApplicationRecord include EachBatch include IgnorableColumns - ignore_column %i[epic_id milestone_id last_edited_at], remove_with: '16.9', remove_after: '2023-01-13' + ignore_column %i[epic_id milestone_id last_edited_at start_date], + remove_with: '16.9', + remove_after: '2024-01-13' alias_attribute :vulnerability_id, :id diff --git a/doc/api/project_vulnerabilities.md b/doc/api/project_vulnerabilities.md index 1fbea66de7f2496e94d1a2f32352f6fdaf0a829f..c15a74522195a3db215066753d1419937898e71a 100644 --- a/doc/api/project_vulnerabilities.md +++ b/doc/api/project_vulnerabilities.md @@ -9,6 +9,7 @@ type: reference, api > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10242) in GitLab 12.6. > - `last_edited_at` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. +> - `start_date` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. WARNING: This API is in the process of being deprecated and considered unstable. @@ -96,7 +97,6 @@ Example response: "resolved_by_id": null, "resolved_on_default_branch": false, "severity": "low", - "start_date": null, "state": "detected", "title": "Regular Expression Denial of Service in debug", "updated_at": "2020-04-07T14:01:04.655Z", @@ -183,7 +183,6 @@ Example response: "resolved_by_id": null, "resolved_on_default_branch": false, "severity": "low", - "start_date": null, "state": "detected", "title": "Regular Expression Denial of Service in debug", "updated_at": "2020-04-07T14:01:04.655Z", diff --git a/doc/api/vulnerabilities.md b/doc/api/vulnerabilities.md index ff45c5d6cfa85ee7960244af81e1a290cec06f20..bddedb05c2c64243515ef384eed348b756e80967 100644 --- a/doc/api/vulnerabilities.md +++ b/doc/api/vulnerabilities.md @@ -8,6 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10242) in GitLab 12.6. > - `last_edited_at` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. +> - `start_date` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. NOTE: The former Vulnerabilities API was renamed to Vulnerability Findings API @@ -64,7 +65,6 @@ Example response: "updated_by_id": null, "last_edited_by_id": null, "closed_by_id": null, - "start_date": null, "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", @@ -113,7 +113,6 @@ Example response: "updated_by_id": null, "last_edited_by_id": null, "closed_by_id": null, - "start_date": null, "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", @@ -162,7 +161,6 @@ Example response: "updated_by_id": null, "last_edited_by_id": null, "closed_by_id": null, - "start_date": null, "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", @@ -211,7 +209,6 @@ Example response: "updated_by_id": null, "last_edited_by_id": null, "closed_by_id": null, - "start_date": null, "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", @@ -260,7 +257,6 @@ Example response: "updated_by_id": null, "last_edited_by_id": null, "closed_by_id": null, - "start_date": null, "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", diff --git a/ee/lib/ee/api/entities/vulnerability.rb b/ee/lib/ee/api/entities/vulnerability.rb index c0571bb4bd1b166b0bb690999ea13b9bb9797d14..313d402ce09db33441812941795d799ae4894bb5 100644 --- a/ee/lib/ee/api/entities/vulnerability.rb +++ b/ee/lib/ee/api/entities/vulnerability.rb @@ -26,7 +26,6 @@ class Vulnerability < Grape::Entity expose :dismissed_by_id expose :confirmed_by_id - expose :start_date expose :due_date expose :created_at @@ -35,9 +34,10 @@ class Vulnerability < Grape::Entity expose :dismissed_at expose :confirmed_at - # This field is deprecated and always returns nil + # These fields are deprecated and always returns nil # TODO remove with https://gitlab.com/gitlab-org/gitlab/-/work_items/431990 expose(:last_edited_at) { |_settings, _options| nil } + expose(:start_date) { |_settings, _options| nil } end end end diff --git a/ee/spec/lib/ee/api/entities/vulnerability_spec.rb b/ee/spec/lib/ee/api/entities/vulnerability_spec.rb index e96cdbeee4ad6487d2658e93f808968d2a0714ad..c11623ba2da52cfcc9222a185897a2c48618e412 100644 --- a/ee/spec/lib/ee/api/entities/vulnerability_spec.rb +++ b/ee/spec/lib/ee/api/entities/vulnerability_spec.rb @@ -36,7 +36,6 @@ expect(subject[:dismissed_by_id]).to eq(vulnerability.dismissed_by_id) expect(subject[:confirmed_by_id]).to eq(vulnerability.confirmed_by_id) - expect(subject[:start_date]).to eq(vulnerability.start_date) expect(subject[:due_date]).to eq(vulnerability.due_date) expect(subject[:created_at]).to eq(vulnerability.created_at)