github / github/ghas-jira-integration

Workflows failing with "The issue type selected is invalid"

Open
#53 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
102
Forks
57
PR merge metrics
No merged PRs in 30d

Description

I am filing this on behalf of my customer @shweta4398 who has successfully set up a workflow with this Action. Every time they run the workflow, it fails with the same error `text: The issue type selected is invalid.`

Here is the Action they provided:

![image](https://github.com/github/ghas-jira-integration/assets/12956304/0876916a-1659-4696-88fa-cfb1269b1af2)

If there is no issue type, the error occurs, or if they add an issue type, same error. `jira_issue_type` does not appear to be a criteria you can populate with this Action.

Looking at a portion of the logs, it appears that somewhere along the way, the `rest/api` path is picked up and the Action seems to identify this as an issue type:

```
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://appdirect.jira.com/rest/api/2/issue
text: The issue type selected is invalid.

response headers = {'Date': 'Mon, 10 Apr 2023 06:09:59 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Server': 'AtlassianEdge', 'Timing-Allow-Origin': '*', 'X-Arequestid': 'e3f409a204a7400ac8bb8f63346850f5', 'X-Aaccountid': '628dac6ff2261e00682a1d81', 'Cache-Control': 'no-cache, no-store, no-transform', 'X-Content-Type-Options': 'nosniff', 'X-Xss-Protection': '1; mode=block', 'Atl-Traceid': '8a5f7da3d11568d8', 'Report-To': '{"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}', 'Nel': '{"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload', 'Transfer-Encoding': 'chunked'}
response text = {"errorMessages":[],"errors":{"issuetype":"The issue type selected is invalid."}}
Error: Process completed with exit code 1.
```
Logs:

[1_Set up job.txt](https://github.com/github/ghas-jira-integration/files/11205290/1_Set.up.job.txt)
[2_Sync CodeQL alerts to Jira issues.txt](https://github.com/github/ghas-jira-integration/files/11205291/2_Sync.CodeQL.alerts.to.Jira.issues.txt)
[4_Complete job.txt](https://github.com/github/ghas-jira-integration/files/11205292/4_Complete.job.txt)

Contributor guide

Open the contributing guide

Research direction

Start with the attached 1_Set up job.txt and 2_Sync CodeQL alerts to Jira issues.txt logs, then trace the workflow's Jira issue-creation request around the /rest/api/2/issue endpoint and jira_issue_type handling. Done means the reported workflow no longer fails with the invalid issue type error and creates the expected Jira issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
api, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.