Commit 5ad7a89e authored by Imre Farkas's avatar Imre Farkas

Merge branch 'issue_218607-expose_manual_status_change' into 'master'

Expose if requirement test report was manually created on GraphQL

See merge request gitlab-org/gitlab!44345
parents 5a0c03c2 faddb531
...@@ -15888,6 +15888,11 @@ type Requirement { ...@@ -15888,6 +15888,11 @@ type Requirement {
""" """
iid: ID! iid: ID!
"""
Indicates if latest test report was created by user
"""
lastTestReportManuallyCreated: Boolean
""" """
Latest requirement test report state Latest requirement test report state
""" """
......
...@@ -45944,6 +45944,20 @@ ...@@ -45944,6 +45944,20 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "lastTestReportManuallyCreated",
"description": "Indicates if latest test report was created by user",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "lastTestReportState", "name": "lastTestReportState",
"description": "Latest requirement test report state", "description": "Latest requirement test report state",
...@@ -2135,6 +2135,7 @@ Represents a requirement. ...@@ -2135,6 +2135,7 @@ Represents a requirement.
| `descriptionHtml` | String | The GitLab Flavored Markdown rendering of `description` | | `descriptionHtml` | String | The GitLab Flavored Markdown rendering of `description` |
| `id` | ID! | ID of the requirement | | `id` | ID! | ID of the requirement |
| `iid` | ID! | Internal ID of the requirement | | `iid` | ID! | Internal ID of the requirement |
| `lastTestReportManuallyCreated` | Boolean | Indicates if latest test report was created by user |
| `lastTestReportState` | TestReportState | Latest requirement test report state | | `lastTestReportState` | TestReportState | Latest requirement test report state |
| `project` | Project! | Project to which the requirement belongs | | `project` | Project! | Project to which the requirement belongs |
| `state` | RequirementState! | State of the requirement | | `state` | RequirementState! | State of the requirement |
......
...@@ -30,6 +30,13 @@ module Types ...@@ -30,6 +30,13 @@ module Types
field :last_test_report_state, RequirementsManagement::TestReportStateEnum, null: true, complexity: 5, field :last_test_report_state, RequirementsManagement::TestReportStateEnum, null: true, complexity: 5,
description: 'Latest requirement test report state' description: 'Latest requirement test report state'
field :last_test_report_manually_created,
GraphQL::BOOLEAN_TYPE,
method: :last_test_report_manually_created?,
null: true,
complexity: 5,
description: 'Indicates if latest test report was created by user'
field :project, ProjectType, null: false, field :project, ProjectType, null: false,
description: 'Project to which the requirement belongs', description: 'Project to which the requirement belongs',
resolve: -> (obj, _args, _ctx) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, obj.project_id).find } resolve: -> (obj, _args, _ctx) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, obj.project_id).find }
......
---
title: Expose if requirement test report wasmanually created on GraphQL
merge_request: 44345
author:
type: added
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe GitlabSchema.types['Requirement'] do RSpec.describe GitlabSchema.types['Requirement'] do
fields = %i[id iid title titleHtml description descriptionHtml state fields = %i[id iid title titleHtml description descriptionHtml state
last_test_report_state project author created_at updated_at last_test_report_state project author created_at updated_at
user_permissions test_reports] user_permissions test_reports last_test_report_manually_created]
it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Requirement) } it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Requirement) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment