Jira ticket does not get created
Closed this issue · 2 comments
Is it possible that if the hardcoded jira ticket priority values don't align with those set up in the project, then the ticket does not get created? The default options currently are: low, medium, high, but in my project the priority options are: blocker, critical, major, minor, trivial. Would it be possible to either dynamically fetch them or be able to define them in values.yaml manually?
Part of the logs that might be relevant:
WARNING:atlassian.jira:Creating issue "test13" DEBUG:atlassian.rest_client:curl --silent -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' --data '"{\"fields\": {\"description\": \"new test\", \"issuetype\": {\"name\": \"Task\"}, \"labels\": [\"incident-management\", \"etc\", \"inc-20239291912-test13\"], \"priority\": {\"id\": null}, \"project\": {\"id\": \"10019\"}, \"summary\": \"test13\"}}"' 'https://team-xxxxxxxxxxxx.atlassian.net/rest/api/2/issue' DEBUG:urllib3.connectionpool:https://team-xxxxxxxxxxxx.atlassian.net:443 "POST /rest/api/2/issue HTTP/1.1" 400 None DEBUG:atlassian.rest_client:HTTP: POST rest/api/2/issue -> 400 Bad Request DEBUG:atlassian.rest_client:HTTP: Response text -> {"errorMessages":[],"errors":{"priority":"Specify the Priority (id or name) in the string format"}} ERROR:atlassian.rest_client:'str' object has no attribute 'get' ERROR:jira:Error creating Jira issue: 400 Client Error: Bad Request for url: https://team-xxxxxxxxxxxx.atlassian.net/rest/api/2/issue ERROR:slack.modals:'NoneType' object has no attribute 'get'
@kurawes I just released v1.4.25
which should fix this issue - thanks for reporting it. I've opted to remove priority all together at this point since it isn't even a guarantee that it will be a configurable field in some cases. It does dynamically get issue types now though. Let me know if you encounter any more issues.
Thank you for the quick fix. Unfortunately dynamically getting the issue types introduced a new little issue. The issue types are not taken only for the selected project but from all projects. Will create a ticket for it with pictures. :)