File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ def _maybe_update_issue_mapped_field(
220
220
target_value = getattr (parameters , f"{ source_field } _map" ).get (source_value )
221
221
222
222
# If field is empty on create, or update is about another field, then nothing to do.
223
- if (context .operation == Operation .CREATE and source_value == "" ) or (
223
+ if (context .operation == Operation .CREATE and source_value in [ "" , "---" ] ) or (
224
224
context .operation == Operation .UPDATE
225
225
and source_field not in context .event .changed_fields ()
226
226
):
Original file line number Diff line number Diff line change @@ -1015,6 +1015,30 @@ def test_update_issue_points_removed(
1015
1015
)
1016
1016
1017
1017
1018
+ def test_empty_issue_points_ignored_on_create (
1019
+ action_context_factory ,
1020
+ mocked_jira ,
1021
+ action_params_factory ,
1022
+ webhook_event_change_factory ,
1023
+ ):
1024
+ action_context = action_context_factory (
1025
+ operation = Operation .CREATE ,
1026
+ current_step = "maybe_update_issue_points" ,
1027
+ bug__see_also = ["https://mozilla.atlassian.net/browse/JBI-234" ],
1028
+ jira__issue = "JBI-234" ,
1029
+ bug__cf_fx_points = "---" ,
1030
+ )
1031
+
1032
+ params = action_params_factory (
1033
+ jira_project_key = action_context .jira .project ,
1034
+ )
1035
+ steps .maybe_update_issue_points (
1036
+ action_context , parameters = params , jira_service = JiraService (mocked_jira )
1037
+ )
1038
+
1039
+ mocked_jira .update_issue_field .assert_not_called ()
1040
+
1041
+
1018
1042
def test_update_issue_points_missing_in_map (
1019
1043
action_context_factory ,
1020
1044
mocked_jira ,
You can’t perform that action at this time.
0 commit comments