You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/dms/storage/workflow.go
+24-6Lines changed: 24 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -384,7 +384,7 @@ SELECT
384
384
w.create_user_uid,
385
385
CAST("" AS DATETIME) AS create_user_deleted_at,
386
386
w.created_at AS create_time,
387
-
curr_ws.assignees AS current_step_assignee_user_id_list,
387
+
IF(wr.status = 'rejected', JSON_ARRAY(w.create_user_uid), curr_ws.assignees) AS current_step_assignee_user_id_list,
388
388
curr_ws.state AS current_step_state,
389
389
wr.status,
390
390
wr.current_workflow_step_id AS current_workflow_step_id,
@@ -413,7 +413,8 @@ w.workflow_type='data_export'
413
413
{{- if .check_user_can_access }}
414
414
AND (
415
415
w.create_user_uid = :current_user_id
416
-
OR curr_ws.assignees REGEXP :current_user_id
416
+
OR (wr.status != 'rejected' AND curr_ws.assignees REGEXP :current_user_id)
417
+
OR (wr.status = 'rejected' AND w.create_user_uid = :current_user_id)
417
418
418
419
419
420
{{- if .viewable_db_service_uids }}
@@ -440,7 +441,7 @@ AND wr.status IN (:filter_status)
440
441
{{- end }}
441
442
442
443
{{- if .filter_current_step_assignee_user_id }}
443
-
AND curr_ws.assignees REGEXP :filter_current_step_assignee_user_id
444
+
AND ((wr.status != 'rejected' AND curr_ws.assignees REGEXP :filter_current_step_assignee_user_id) OR (wr.status = 'rejected' AND w.create_user_uid = :filter_current_step_assignee_user_id))
444
445
{{- end }}
445
446
446
447
{{- if .filter_db_service_uid }}
@@ -573,10 +574,27 @@ func (d *WorkflowRepo) GetGlobalWorkflowsByParameterMap(ctx context.Context, dat
0 commit comments