Commit faddb531 authored by Felipe Artur's avatar Felipe Artur

Expose if requirement test report was manually created on GraphQL

Expose Requirement#last_test_report_manually_created? field on GraphQL
parent 7dc38e15
......@@ -15797,6 +15797,11 @@ type Requirement {
"""
iid: ID!
"""
Indicates if latest test report was created by user
"""
lastTestReportManuallyCreated: Boolean
"""
Latest requirement test report state
"""
......
......@@ -45757,6 +45757,20 @@
"isDeprecated": false,
"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",
"description": "Latest requirement test report state",
......@@ -2130,6 +2130,7 @@ Represents a requirement.
| `descriptionHtml` | String | The GitLab Flavored Markdown rendering of `description` |
| `id` | ID! | 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 |
| `project` | Project! | Project to which the requirement belongs |
| `state` | RequirementState! | State of the requirement |
......
......@@ -30,6 +30,13 @@ module Types
field :last_test_report_state, RequirementsManagement::TestReportStateEnum, null: true, complexity: 5,
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,
description: 'Project to which the requirement belongs',
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'
RSpec.describe GitlabSchema.types['Requirement'] do
fields = %i[id iid title titleHtml description descriptionHtml state
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) }
......
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