Skip to content

Commit

Permalink
🐛 Don't return issueTypes with the subtask flag set (#440)
Browse files Browse the repository at this point in the history
New issues that belong to issue types with the `subtask` flag set
(including the "Sub-task" built in issue type) are required to have a
parent issue set. We don't support setting the parent issue, so
exporting migration waves as issues of such types will fail. To fix
this, avoid returning issue types with the `subtask` flag set from the
`/trackers/:id/projects/:pid/issuetypes` endpoint.

Fixes https://issues.redhat.com/browse/MTA-870 by removing the option to
export as a Sub-task.

Signed-off-by: Sam Lucidi <slucidi@redhat.com>
  • Loading branch information
mansam authored Jul 14, 2023
1 parent a063703 commit f22a7a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tracker/jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ func (r *JiraConnector) IssueTypes(id string) (issueTypes []IssueType, err error
return
}
for _, i := range project.IssueTypes {
if i.Subtask {
continue
}
issueType := IssueType{
ID: i.ID,
Name: i.Name,
Expand Down

0 comments on commit f22a7a4

Please sign in to comment.