Commit d5dfee6a authored by Etienne Baqué's avatar Etienne Baqué

Merge branch '344898_display_license_id_retrieved_from_customersdot' into 'master'

Display license ID retrieved from CustomersDot

See merge request gitlab-org/gitlab!82112
parents 919e20e5 6d9df1c3
......@@ -9730,7 +9730,7 @@ Represents the current license.
| <a id="currentlicensecreatedat"></a>`createdAt` | [`Date`](#date) | Date when the license was added. |
| <a id="currentlicenseemail"></a>`email` | [`String`](#string) | Email of the licensee. |
| <a id="currentlicenseexpiresat"></a>`expiresAt` | [`Date`](#date) | Date when the license expires. |
| <a id="currentlicenseid"></a>`id` | [`ID!`](#id) | ID of the license. |
| <a id="currentlicenseid"></a>`id` | [`ID!`](#id) | ID of the license extracted from the license data. |
| <a id="currentlicenselastsync"></a>`lastSync` | [`Time`](#time) | Date when the license was last synced. |
| <a id="currentlicensemaximumusercount"></a>`maximumUserCount` | [`Int`](#int) | Highest number of billable users on the system during the term of the current license. |
| <a id="currentlicensename"></a>`name` | [`String`](#string) | Name of the licensee. |
......@@ -12250,7 +12250,7 @@ Represents an entry from the Cloud License history.
| <a id="licensehistoryentrycreatedat"></a>`createdAt` | [`Date`](#date) | Date when the license was added. |
| <a id="licensehistoryentryemail"></a>`email` | [`String`](#string) | Email of the licensee. |
| <a id="licensehistoryentryexpiresat"></a>`expiresAt` | [`Date`](#date) | Date when the license expires. |
| <a id="licensehistoryentryid"></a>`id` | [`ID!`](#id) | ID of the license. |
| <a id="licensehistoryentryid"></a>`id` | [`ID!`](#id) | ID of the license extracted from the license data. |
| <a id="licensehistoryentryname"></a>`name` | [`String`](#string) | Name of the licensee. |
| <a id="licensehistoryentryplan"></a>`plan` | [`String!`](#string) | Name of the subscription plan. |
| <a id="licensehistoryentrystartsat"></a>`startsAt` | [`Date`](#date) | Date when the license started. |
......@@ -8,8 +8,7 @@ module Types
included do
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the license.',
method: :license_id
description: 'ID of the license extracted from the license data.'
field :type, GraphQL::Types::String, null: false,
description: 'Type of the license.',
......@@ -48,6 +47,10 @@ module Types
field :users_in_license_count, GraphQL::Types::Int, null: true,
description: 'Number of paid users in the license.',
method: :restricted_user_count
def id
::Gitlab::GlobalId.build(object, model_name: object.class.to_s, id: object.license_id).to_s
end
end
end
end
......
......@@ -48,7 +48,7 @@ RSpec.shared_examples_for 'license type fields' do
describe 'id' do
let(:field_name) { :id }
it { is_expected.to eq(license.to_global_id) }
it { is_expected.to include(license.license_id.to_s) }
end
describe 'type' do
......
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