From f22a7a4d97f23687b6b7bc480e2e47e95fbdb61b Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Fri, 14 Jul 2023 09:34:34 -0400 Subject: [PATCH] :bug: Don't return issueTypes with the subtask flag set (#440) 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 --- tracker/jira.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tracker/jira.go b/tracker/jira.go index 017ddd5d0..eeb408067 100644 --- a/tracker/jira.go +++ b/tracker/jira.go @@ -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,