Skip to content

Support creating issues with custom subtask type#372

Merged
ankitpokhrel merged 1 commit intoankitpokhrel:mainfrom
danobi:custom_subtask
May 27, 2022
Merged

Support creating issues with custom subtask type#372
ankitpokhrel merged 1 commit intoankitpokhrel:mainfrom
danobi:custom_subtask

Conversation

@danobi
Copy link
Contributor

@danobi danobi commented May 25, 2022

Before, the code was assuming only one sub-task type existed (the
default). This would cause any issues filed with a custom sub-task type
to fail with the following error:

Error:
  - Issue 'XXX-23668' must be of type 'Epic'.

jira: Received unexpected response '400 Bad Request'

because jira.CreateRequest::SubtaskField was not being set.

Fix by modifying GetSubtaskHandle() helper to look for exact matches
on sub-task types.

Before, the code was assuming only one sub-task type existed (the
default). This would cause any issues filed with a custom sub-task type
to fail with the following error:

```
Error:
  - Issue 'XXX-23668' must be of type 'Epic'.

jira: Received unexpected response '400 Bad Request'
```

because `jira.CreateRequest::SubtaskField` was not being set.

Fix by modifying `GetSubtaskHandle()` helper to look for exact matches
on sub-task types.
Copy link
Owner

@ankitpokhrel ankitpokhrel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran into same issue today and this seems to be working fine. Thank you for working on this @danobi 🎉

@ankitpokhrel ankitpokhrel merged commit 9782ecb into ankitpokhrel:main May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants