github / ghas-jira-integration

Synchronize GitHub Code Scanning alerts to Jira issues
Apache License 2.0
81 stars 44 forks source link

Workflows failing with "The issue type selected is invalid" #53

Open cgaudette opened 1 year ago

cgaudette commented 1 year ago

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

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 2_Sync CodeQL alerts to Jira issues.txt 4_Complete job.txt

Shweta4398 commented 1 year ago

Team,

Yes the above issue seems to be still persisting , Can you guide me on the above errors???

Thanks, Shweta.

Shweta4398 commented 1 year ago

Hello team ,

Can you add jira_issue_type to the workflow?? So that I would be able to execute the workflow!!

Thanks, Shweta.

Tavisca-ayal-gul commented 3 months ago

This issue is occuring for me as well. is jira_issue_type the correct field used or do we use another field.