mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
studyright cancellation in case status CANCELLED_BY_ADMINISTRATION
This commit is contained in:
@@ -137,7 +137,7 @@ const main = async () => {
|
||||
console.log('starting')
|
||||
//await bsc()
|
||||
//await msc()
|
||||
await programmeDiff('KH57_002')
|
||||
await programmeDiff('KH20_001')
|
||||
process.exit()
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ const updateStudyRights = async (studyRights, personIdToStudentNumber, personIdT
|
||||
|
||||
const parseCancelDate = (studyright, phase_number = 1, isBaMa = false) => {
|
||||
if (isBaMa && phase_number === 1 && get(studyright, 'study_right_graduation.phase1GraduationDate')) return null
|
||||
if (studyright.state === 'RESCINDED') return studyright.study_right_cancellation.cancellationDate
|
||||
|
||||
if (['RESCINDED','CANCELLED_BY_ADMINISTRATION'].includes(studyright.state)) return studyright.study_right_cancellation.cancellationDate
|
||||
if (studyright.state === 'PASSIVE') return studyright.snapshot_date_time
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user