Skip to content

Commit

Permalink
Remove complex JIRA fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dacoaster committed Aug 14, 2023
1 parent eba1ab1 commit 98d2ac7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/jira/JiraAddIssue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions src/integrations/JiraIntegrationHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 98d2ac7

Please sign in to comment.