File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 46
46
OBS_TIME_LOST_FIELD = "customfield_10106"
47
47
OBS_SYSTEMS_FIELD = "customfield_10476"
48
48
49
- # Using Unknown component for now
50
- # For a full list check:
51
- # https://rubinobs.atlassian.net/rest/api/latest/project/OBS/components
52
- OBS_DEFAULT_COMPONENT_ID = "11614"
53
-
54
49
DATETIME_ISO_FORMAT = "%Y-%m-%dT%H:%M:%S.%f"
55
50
56
51
@@ -422,11 +417,7 @@ def jira_ticket(request_data):
422
417
423
418
tags_data = request_data .get ("tags" ).split ("," ) if request_data .get ("tags" ) else []
424
419
425
- obs_system_selection = (
426
- request_data .get ("jira_obs_selection" )
427
- if request_data .get ("jira_obs_selection" )
428
- else '{"selection": []}'
429
- )
420
+ obs_system_selection = request_data .get ("jira_obs_selection" )
430
421
431
422
try :
432
423
jira_payload = {
@@ -452,10 +443,10 @@ def jira_ticket(request_data):
452
443
# else "off"
453
444
# ),
454
445
OBS_TIME_LOST_FIELD : float (request_data .get ("time_lost" , 0 )),
455
- OBS_SYSTEMS_FIELD : json .loads (obs_system_selection ),
456
446
},
457
- "update" : {"components" : [{"set" : [{"id" : OBS_DEFAULT_COMPONENT_ID }]}]},
458
447
}
448
+ if obs_system_selection :
449
+ jira_payload ["fields" ][OBS_SYSTEMS_FIELD ] = json .loads (obs_system_selection )
459
450
except Exception as e :
460
451
return Response (
461
452
{
You can’t perform that action at this time.
0 commit comments