Skip to content

Commit 6a09199

Browse files
authored
Follow-up of #1212: set value to 'None' when unset (#1220)
1 parent 088480d commit 6a09199

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

config/config.prod.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@
389389
status_map: *basic-status-map
390390
resolution_map: *basic-resolution-map
391391
priority_map:
392-
"--": (None)
392+
"": None
393+
"--": None
393394
P1: P1
394395
P2: P2
395396
P3: P3

jbi/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ class ActionParams(BaseModel, frozen=True):
9797
labels_brackets: Literal["yes", "no", "both"] = "no"
9898
status_map: dict[str, str] = {}
9999
priority_map: dict[str, str] = {
100-
"": "(None)",
101-
"--": "(None)",
100+
"": "None",
101+
"--": "None",
102102
"P1": "P1",
103103
"P2": "P2",
104104
"P3": "P3",

jbi/steps.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,6 @@ def _maybe_update_issue_mapped_field(
280280
)
281281
return (StepStatus.INCOMPLETE, context)
282282

283-
# Special handling for clearing fields in Jira.
284-
if target_value == "(None)":
285-
target_value = None
286-
wrap_value = None
287-
288283
resp = jira_service.update_issue_field(
289284
context,
290285
target_field,

tests/unit/test_steps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ def test_update_issue_remove_priority(
841841

842842
assert result == steps.StepStatus.SUCCESS
843843
mocked_jira.update_issue_field.assert_called_with(
844-
key="JBI-234", fields={"priority": None}
844+
key="JBI-234", fields={"priority": {"name": "None"}}
845845
)
846846

847847

0 commit comments

Comments
 (0)