Add GraphQL field to determine if Jira issue creation is enabled
Context
It is possible to enable a setting, which allows Jira-issue creation from within the modal.
This can be done by going to the related settings page (example: http://gdk.test:3000/security/security-reports/-/settings/integrations/jira/edit) and enabling the following settings:
On the current REST (e.g: http://gdk.test:3000/api/v4/projects/20/vulnerability_findings?pipeline_id=598&scope=dismissed&t=1680722178814) endpoint we include a field (create_jira_issue_url) that contains the URL for creating the Jira issue. If that field is populated, then we render the "Create Jira issue" button, otherwise a "Create Issue button" (Gitlab issue).
We need to include that information within the GraphQL endpoint. Since the setting is project-wide, it might make sense to include it within the project field.
This should be a boolean flag. Possible solution:
query getSecurityReportFinding($projectFullPath: ID!, $pipelineIid: ID!, $findingUuid: String!) {
project(fullPath: $projectFullPath) {
id
webUrl
nameWithNamespace
hasJiraVulnerabilityIssueCreationEnabled # <-- added field
# ... rest of query
Implementation plan:
-
Add hasJiraVulnerabilityIssueCreationEnabledfield to EE::Types::ProjectType as this is a project level configuration -
Use the existing method configured_to_create_issues_from_vulnerabilities? to populate the field mentioned in the earlier step


