diff --git a/app/models/vulnerability.rb b/app/models/vulnerability.rb index 1dff78354db5f18e0c81e49b1f684f4635bcc7bd..a9e1b2dbc5b34ef4374dca39e8ad8863a4feb8ce 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], remove_with: '16.9', remove_after: '2023-01-13' + ignore_column %i[epic_id milestone_id last_edited_at], remove_with: '16.9', remove_after: '2023-01-13' alias_attribute :vulnerability_id, :id diff --git a/doc/api/project_vulnerabilities.md b/doc/api/project_vulnerabilities.md index 2b4d3ec50dfd69bdf9f4d392d4b332094ef9430e..1fbea66de7f2496e94d1a2f32352f6fdaf0a829f 100644 --- a/doc/api/project_vulnerabilities.md +++ b/doc/api/project_vulnerabilities.md @@ -7,7 +7,8 @@ type: reference, api # Project Vulnerabilities API **(ULTIMATE ALL)** -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10242) in GitLab 12.6. +> - [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. WARNING: This API is in the process of being deprecated and considered unstable. @@ -79,7 +80,6 @@ Example response: "vulnerability_id": 103 }, "id": 103, - "last_edited_at": null, "last_edited_by_id": null, "project": { "created_at": "2020-04-07T13:54:25.634Z", @@ -167,7 +167,6 @@ Example response: "vulnerability_id": 103 }, "id": 103, - "last_edited_at": null, "last_edited_by_id": null, "project": { "created_at": "2020-04-07T13:54:25.634Z", diff --git a/doc/api/vulnerabilities.md b/doc/api/vulnerabilities.md index dc5e5c5f509eb988c38535932fb8e6f4ac189d66..ff45c5d6cfa85ee7960244af81e1a290cec06f20 100644 --- a/doc/api/vulnerabilities.md +++ b/doc/api/vulnerabilities.md @@ -6,7 +6,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Vulnerabilities API **(ULTIMATE ALL)** -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10242) in GitLab 12.6. +> - [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. NOTE: The former Vulnerabilities API was renamed to Vulnerability Findings API @@ -67,7 +68,6 @@ Example response: "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", - "last_edited_at": null, "closed_at": null } ``` @@ -117,7 +117,6 @@ Example response: "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", - "last_edited_at": null, "closed_at": null } ``` @@ -167,7 +166,6 @@ Example response: "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", - "last_edited_at": null, "closed_at": null } ``` @@ -217,7 +215,6 @@ Example response: "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", - "last_edited_at": null, "closed_at": null } ``` @@ -267,7 +264,6 @@ Example response: "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", - "last_edited_at": null, "closed_at": null } ``` diff --git a/ee/lib/ee/api/entities/vulnerability.rb b/ee/lib/ee/api/entities/vulnerability.rb index 504834cf353498498be0cf8c25c7bb96015f1055..c0571bb4bd1b166b0bb690999ea13b9bb9797d14 100644 --- a/ee/lib/ee/api/entities/vulnerability.rb +++ b/ee/lib/ee/api/entities/vulnerability.rb @@ -31,10 +31,13 @@ class Vulnerability < Grape::Entity expose :created_at expose :updated_at - expose :last_edited_at expose :resolved_at expose :dismissed_at expose :confirmed_at + + # This field is deprecated and always returns nil + # TODO remove with https://gitlab.com/gitlab-org/gitlab/-/work_items/431990 + expose(:last_edited_at) { |_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 e712f517eeafe96b43f6514023f0dcb54d818800..e96cdbeee4ad6487d2658e93f808968d2a0714ad 100644 --- a/ee/spec/lib/ee/api/entities/vulnerability_spec.rb +++ b/ee/spec/lib/ee/api/entities/vulnerability_spec.rb @@ -41,7 +41,6 @@ expect(subject[:created_at]).to eq(vulnerability.created_at) expect(subject[:updated_at]).to eq(vulnerability.updated_at) - expect(subject[:last_edited_at]).to eq(vulnerability.last_edited_at) expect(subject[:resolved_at]).to eq(vulnerability.resolved_at) expect(subject[:dismissed_at]).to eq(vulnerability.dismissed_at) expect(subject[:confirmed_at]).to eq(vulnerability.confirmed_at)