Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ Occasionally, HR will submit an onboarding request before a UCD IAM/UC Path reco
### Separation
The steps for separating an employee are as follows:
- HR uses the separation endpoint to submit a request, which generates a separation record and an associated RT ticket.
- When the separation date has passed, an ITIS programmer will need to manually remove the employee from the local database and Keycloak by doing the following:
- When the Last Day of System Access has passed, an ITIS programmer will need to manually remove the employee from the local database and Keycloak by doing the following:
- Clicking the `Deprovision From Library IAM Database` on the GUI
- Or using the cli:
- `separation ls` to get the separation record id
- `employees separate <separation-record-id>`
- The system will send a reminder to the RT ticket when the separation date has passed.
- The system will send a reminder to the RT ticket when the Last Day of System Access has passed.

### Discrepancy Notifications
When possible, the system will update local employee records when the UCD IAM record is updated - for example, when an employee changes their preferred name in the UC Davis directory. However, there are some cases where an automatic update isn't possible or is ill-advised, in which case a discrepancy notification is created. These notifications are bundled and sent to the ITIS error notification slack channel once a week. It is contingent on an ITIS programmer to resolve them:
Expand Down
2 changes: 1 addition & 1 deletion services/app/api/separation.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default (api) => {
}, false);
ticket.addContent(`<h4>Details</h4>`);
ticket.addContent({
'Separation Date': payload.separationDate,
'Last Day of System Access': payload.separationDate,
'Supervisor': `${ad.supervisorLastName}, ${ad.supervisorFirstName}`
}, false);
if ( payload.notes ){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function render() {
<li><strong>RT Ticket ID: </strong>${r.rtTicketId}</li>
</ul>
${r.separationDate ? html`
<div class="text--smaller"><strong>Separation Date: </strong>${DtUtils.fmtDatetime(r.separationDate, {dateOnly: true, UTC: true})}</div>
<div class="text--smaller"><strong>Last Day of System Access: </strong>${DtUtils.fmtDatetime(r.separationDate, {dateOnly: true, UTC: true})}</div>
` : html``}
<div ?hidden=${!(this.AuthModel.isAdmin && r?.additionalData?.removedFromSystems?.length)}>
<div class="text--smaller"><strong>Deprovisioned: </strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function renderSubmissionForm(){
<h2 class="panel__title"><span class="panel__custom-icon fas fa-briefcase"></span>Separation Information</h2>
<section>
<div class="field-container">
<label for="sp-separation-date">Date of Separation <abbr title="Required">*</abbr></label>
<label for="sp-separation-date">Last Day of System Access <abbr title="Required">*</abbr></label>
<input id='sp-separation-date' type="date" required .value=${this.separationDate} @input=${(e) => {this.separationDate = e.target.value;}}>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function render() {
<div><label class='u-inline'>Employee ID:</label> ${this.employeeId}</div>
<div><label class='u-inline'>Employee User ID:</label> ${this.employeeUserId}</div>
<div><label class='u-inline'>Department:</label> ${this.department}</div>
<div><label class='u-inline'>Separation Date:</label> ${this.separationDate}</div>
<div><label class='u-inline'>Last Day of System Access:</label> ${this.separationDate}</div>
</div>
<div class="panel panel--icon panel--icon-custom o-box panel--icon-delta">
<h2 class="panel__title"><span class="panel__custom-icon fas fa-sitemap"></span>Supervisor</h2>
Expand Down
10 changes: 5 additions & 5 deletions services/lib/models/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,11 @@ class iamAdmin {
}
let separationDate = record.separation_date;
if ( !separationDate ) {
out.log.message = 'No separation date found';
out.log.message = 'Last Day of System Access not found';
return out;
}
if ( record.submitted && record.submitted > separationDate ) {
out.log.message = 'Separation date is before submitted date';
out.log.message = 'Last Day of System Access is before submitted date';
return out;
}
let separationDay = separationDate.toISOString().split('T')[0];
Expand All @@ -628,7 +628,7 @@ class iamAdmin {
dayAfter.setDate(dayAfter.getDate() + 1);
const now = new Date();
if ( dayAfter > now ) {
out.log.message = 'Separation date is in the future';
out.log.message = 'Last Day of System Access is in the future';
return out;
}

Expand All @@ -654,8 +654,8 @@ class iamAdmin {
const rtClient = new models.rt(rtConfig);
const ticket = new models.rtTicket(false, {id: rtTicketId});
const reply = ticket.createReply();
reply.addSubject('Reminder: Employee Separation Date');
reply.addContent(`This is just a reminder for ITIS administrators that the separation date (${separationDay}) for ${employeeName} has passed.`);
reply.addSubject('Reminder: Employee\'s Last Day of System Access');
reply.addContent(`This is just a reminder for ITIS administrators that the last day of system access (${separationDay}) for ${employeeName} has passed.`);
reply.addContent('Please update the employee record and any access control lists accordingly.');
const rtResponse = await rtClient.sendCorrespondence(reply);
if ( rtResponse.err ) {
Expand Down
2 changes: 1 addition & 1 deletion services/maintenance/src/check-separation-records.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function SeparationStatusError(error) {
/**
* @description Reviews all active separation records and
* - checks if the RT ticket has been resolved, in which case the status is updated
* - sends reminder comment on separation date
* - sends reminder comment on Last Day of System Access
* @param {Boolean} logError - if true, will simply throw an error instead of sending message to slack
* @param {Boolean} saveToDB - if true, will save a record of the run to the jobs table
*/
Expand Down