Expose hasStatusesFeature, issuesSettings and adminWorkItemLifecycle GraphQL fields
Expose the hasStatusesFeature, issuesSettings, and adminWorkItemLifecycle GraphQL fields to allow the frontend to query the necessary data directly, instead of relying on HAML-based injection.
These fields will be used to determine whether the current user has maintainer access to the root group and whether the work item statuses licensed feature is available. If conditions are met, the status widget will display a link to the settings page where configurable lifecycles and statuses can be managed. Here's the related issue and designs.
query workItemMetadata($fullPath: ID!) {
namespace(fullPath: $fullPath) {
id
licensedFeatures {
hasIssueWeightsFeature
hasIterationsFeature
hasOkrsFeature
hasSubepicsFeature
hasIssuableHealthStatusFeature
hasEpicsFeature
hasScopedLabelsFeature
hasQualityManagementFeature
hasLinkedItemsEpicsFeature
hasIssueDateFilterFeature
hasStatusesFeature
}
linkPaths {
issuesList
contributionGuidePath
labelsManage
newProject
register
reportAbuse
signIn
issuesSettings
}
}
}
query workspacePermissions($fullPath: ID!) {
workspace: group(fullPath: $fullPath) {
id
userPermissions {
adminWorkItemLifecycle
}
}
}
Edited by Agnes Slota