From 98d2ac73fd86413ff940f89269ca549a739c0ed7 Mon Sep 17 00:00:00 2001 From: dacoaster Date: Sun, 13 Aug 2023 17:04:45 -0700 Subject: [PATCH] Remove complex JIRA fields --- src/components/jira/JiraAddIssue.vue | 7 ++++++- src/integrations/JiraIntegrationHelpers.js | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/jira/JiraAddIssue.vue b/src/components/jira/JiraAddIssue.vue index 7602055a..6b8741e3 100644 --- a/src/components/jira/JiraAddIssue.vue +++ b/src/components/jira/JiraAddIssue.vue @@ -500,7 +500,12 @@ export default { !thisField[0]?.required && (["number", "string"].includes(thisField[0]?.schema?.type) || (thisField[0]?.schema?.type === "array" && - thisField[0]?.schema?.items === "json")) //CTODO + thisField[0]?.schema?.items === "json")) + // This second set of parameters are to filter JIRA fields + // like "Sprints" which need the data pulled from the api. + // I have removed Sprints from incoming fields though, so + // this may not be necessary. But it may prevent issues + // with similar fields in the future. ) { // Remove unrequired simple fields that haven't changed. this.$delete(this.newIssue.fields, key); diff --git a/src/integrations/JiraIntegrationHelpers.js b/src/integrations/JiraIntegrationHelpers.js index 67b46b88..c63f2502 100644 --- a/src/integrations/JiraIntegrationHelpers.js +++ b/src/integrations/JiraIntegrationHelpers.js @@ -303,9 +303,14 @@ export default { item && item.key !== "issuetype" && item.key !== "project" && + item.name !== "Sprint" && item.schema.type !== "any" && !["attachment", "issuelinks"].includes(item.schema.system) ) { + // We exclude fields we will add back in later (projects) and + // those that need to have options pulled from the API separately + // (Sprints). We may want to renable the latter at some point + // and handle it in a generic way. returnResponse.fieldData.push(item); if (item.key === "reporter") { const reporter = {