Skip to content

Commit

Permalink
SAK-45992: Fixed Bullhorn Notification for group assignment with futu… (
Browse files Browse the repository at this point in the history
sakaiproject#9864)

* SAK-45992: Fixed Bullhorn Notification for group assignment with future open date

* SAK-45992: changed !(openTime.isAfter(Instant.now()) to openTime.isBefore(Instant.now())
  • Loading branch information
jkjanetschek authored Sep 29, 2021
1 parent 9944379 commit f3c8939
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8119,14 +8119,20 @@ private void post_save_assignment(RunData data, String postOrSave) {
}

if (!aOldAccess.equals(a.getTypeOfAccess())) {
// site-group access setting changed
eventTrackingService.post(eventTrackingService.newEvent(AssignmentConstants.EVENT_UPDATE_ASSIGNMENT_ACCESS, assignmentReference, true));
//SAK-45992
if(openTime.isBefore(Instant.now())){
// site-group access setting changed
eventTrackingService.post(eventTrackingService.newEvent(AssignmentConstants.EVENT_UPDATE_ASSIGNMENT_ACCESS, assignmentReference, true));
}
} else {
Collection aGroups = a.getGroups();
if (!(aOldGroups == null && aGroups == null)
&& !(aOldGroups != null && aGroups != null && aGroups.containsAll(aOldGroups) && aOldGroups.containsAll(aGroups))) {
//group changed
eventTrackingService.post(eventTrackingService.newEvent(AssignmentConstants.EVENT_UPDATE_ASSIGNMENT_ACCESS, assignmentReference, true));
//SAK-45992
if(openTime.isBefore(Instant.now())){
//group changed
eventTrackingService.post(eventTrackingService.newEvent(AssignmentConstants.EVENT_UPDATE_ASSIGNMENT_ACCESS, assignmentReference, true));
}
}
}

Expand Down

0 comments on commit f3c8939

Please sign in to comment.