diff --git a/app/models/vulnerability.rb b/app/models/vulnerability.rb index da607dcb7718cc1746dbec3709af28a9729cc910..6bf63bab82c19f0aa4d518779a44c357421571b3 100644 --- a/app/models/vulnerability.rb +++ b/app/models/vulnerability.rb @@ -5,7 +5,7 @@ class Vulnerability < ApplicationRecord include EachBatch include IgnorableColumns - ignore_column %i[epic_id milestone_id last_edited_at last_edited_by_id + ignore_column %i[due_date epic_id milestone_id last_edited_at last_edited_by_id start_date start_date_sourcing_milestone_id updated_by_id], remove_with: '16.9', remove_after: '2024-01-19' diff --git a/doc/api/project_vulnerabilities.md b/doc/api/project_vulnerabilities.md index c3f03d0a073c36f45fff6500fd5624701e0d30b7..677ec2afc84c8a804675355b86ec1b9c6b8b9295 100644 --- a/doc/api/project_vulnerabilities.md +++ b/doc/api/project_vulnerabilities.md @@ -12,6 +12,7 @@ type: reference, api > - `start_date` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. > - `updated_by_id` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. > - `last_edited_by_id` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. +> - `due_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. @@ -63,7 +64,6 @@ Example response: "description": null, "dismissed_at": null, "dismissed_by_id": null, - "due_date": null, "finding": { "confidence": "medium", "created_at": "2020-04-07T14:01:04.630Z", @@ -147,7 +147,6 @@ Example response: "description": null, "dismissed_at": null, "dismissed_by_id": null, - "due_date": null, "finding": { "confidence": "medium", "created_at": "2020-04-07T14:01:04.630Z", diff --git a/doc/api/vulnerabilities.md b/doc/api/vulnerabilities.md index 4820eb89e0d9885ee3031ec26029b90fb488ced6..8dd41e7a6d12b94d7050a6848da81aa641e2eb9e 100644 --- a/doc/api/vulnerabilities.md +++ b/doc/api/vulnerabilities.md @@ -11,6 +11,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w > - `start_date` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. > - `updated_by_id` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. > - `last_edited_by_id` [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/268154) in GitLab 16.7. +> - `due_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 @@ -65,7 +66,6 @@ Example response: }, "author_id": 1, "closed_by_id": null, - "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", "closed_at": null @@ -111,7 +111,6 @@ Example response: }, "author_id": 1, "closed_by_id": null, - "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", "closed_at": null @@ -157,7 +156,6 @@ Example response: }, "author_id": 1, "closed_by_id": null, - "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", "closed_at": null @@ -203,7 +201,6 @@ Example response: }, "author_id": 1, "closed_by_id": null, - "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", "closed_at": null @@ -249,7 +246,6 @@ Example response: }, "author_id": 1, "closed_by_id": null, - "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", "closed_at": null diff --git a/ee/lib/ee/api/entities/vulnerability.rb b/ee/lib/ee/api/entities/vulnerability.rb index 752741fa4d4efd3385f505776defd55bb42e6eaa..a4f5b5f7fe10fc1dc217fd188949d6671d2b41e1 100644 --- a/ee/lib/ee/api/entities/vulnerability.rb +++ b/ee/lib/ee/api/entities/vulnerability.rb @@ -24,8 +24,6 @@ class Vulnerability < Grape::Entity expose :dismissed_by_id expose :confirmed_by_id - expose :due_date - expose :created_at expose :updated_at expose :resolved_at @@ -38,6 +36,7 @@ class Vulnerability < Grape::Entity expose(:start_date) { |_settings, _options| nil } expose(:updated_by_id) { |_settings, _options| nil } expose(:last_edited_by_id) { |_settings, _options| nil } + expose(:due_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 826272f9e65b20cb92cd88c5622e5dec768e8edb..7024e4988ffcab08a22891f1bceeb25c4db08c16 100644 --- a/ee/spec/lib/ee/api/entities/vulnerability_spec.rb +++ b/ee/spec/lib/ee/api/entities/vulnerability_spec.rb @@ -34,8 +34,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[:due_date]).to eq(vulnerability.due_date) - expect(subject[:created_at]).to eq(vulnerability.created_at) expect(subject[:updated_at]).to eq(vulnerability.updated_at) expect(subject[:resolved_at]).to eq(vulnerability.resolved_at) @@ -44,10 +42,11 @@ # These fields are deprecated and always returns nil # TODO remove with https://gitlab.com/gitlab-org/gitlab/-/work_items/431990 - deprecated_fields = subject.to_h.slice(*%i[last_edited_at start_date updated_by_id last_edited_by_id]) + deprecated_fields = subject.to_h.slice(*%i[due_date last_edited_at start_date updated_by_id last_edited_by_id]) expect(deprecated_fields).to eq( last_edited_at: nil, start_date: nil, + due_date: nil, updated_by_id: nil, last_edited_by_id: nil )