Skip to content

Commit

Permalink
mailer - support removing jira fields
Browse files Browse the repository at this point in the history
  • Loading branch information
kentnsw committed Aug 23, 2022
1 parent 2942310 commit 6accb72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/c7n_mailer/c7n_mailer/jira_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ def jira_handler(self, message, jira_messages):
"priority": {"name": priority},
}
)
issue_list[-1].update(**self.custom_fields.get(jira_project, {}))
custom_fields = self.custom_fields.get(jira_project, {})
issue_list[-1].update(**custom_fields)
# NOTE remove all `cannot-be-set` attributes
for k in [k for k, v in custom_fields.items() if v == "cannot-be-set"]:
issue_list[-1].pop(k)

if issue_list:
issueIds = self.create_issues(issue_list)
Expand Down

0 comments on commit 6accb72

Please sign in to comment.