Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: Set createdByUserLogin and lastModifiedByUserLogin while scheduling/updating jobs (#647). #648

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@
'recurrenceTimeZone': this.state.user.current.userTimeZone,
'tempExprId': job.jobStatus,
'statusId': "SERVICE_PENDING",
'runTimeEpoch': '' // when updating a job clearning the epoch time, as job honors epoch time as runTime and the new job created also uses epoch time as runTime
'runTimeEpoch': '', // when updating a job clearning the epoch time, as job honors epoch time as runTime and the new job created also uses epoch time as runTime
'lastModifiedByUserLogin': this.state.user.current.userLoginId
} as any

job?.runTime && (payload['runTime'] = job.runTime)
Expand Down Expand Up @@ -566,7 +567,9 @@
'maxRecurrenceCount': '-1',
'parentJobId': job.parentJobId,
'runAsUser': 'system', //default system, but empty in run now. TODO Need to remove this as we are using SERVICE_RUN_AS_SYSTEM, currently kept it for backward compatibility
'recurrenceTimeZone': this.state.user.current.userTimeZone
'recurrenceTimeZone': this.state.user.current.userTimeZone,
'createdByUserLogin': this.state.user.current.userLoginId,
'lastModifiedByUserLogin': this.state.user.current.userLoginId,
},
'statusId': "SERVICE_PENDING",
'systemJobEnumId': job.systemJobEnumId,
Expand Down Expand Up @@ -678,7 +681,7 @@
return resp;
},

async runServiceNow({ dispatch }, params) {

Check warning on line 684 in src/store/modules/job/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (16.x)

'dispatch' is defined but never used
let resp;

const job = params.job
Expand All @@ -694,6 +697,8 @@
'tempExprId': job.jobStatus, // Need to remove this as we are passing frequency in SERVICE_TEMP_EXPR, currently kept it for backward compatibility
'parentJobId': job.parentJobId,
'recurrenceTimeZone': this.state.user.current.userTimeZone,
'createdByUserLogin': this.state.user.current.userLoginId,
'lastModifiedByUserLogin': this.state.user.current.userLoginId
},
'statusId': "SERVICE_PENDING",
'systemJobEnumId': job.systemJobEnumId,
Expand Down Expand Up @@ -892,7 +897,9 @@
'maxRecurrenceCount': '-1',
'parentJobId': job.parentJobId,
'runAsUser': 'system', //default system, but empty in run now. TODO Need to remove this as we are using SERVICE_RUN_AS_SYSTEM, currently kept it for backward compatibility
'recurrenceTimeZone': this.state.user.current.userTimeZone
'recurrenceTimeZone': this.state.user.current.userTimeZone,
'createdByUserLogin': this.state.user.current.userLoginId,
'lastModifiedByUserLogin': this.state.user.current.userLoginId
},
'statusId': "SERVICE_PENDING",
'systemJobEnumId': job.systemJobEnumId
Expand Down
Loading