Skip to content

Commit

Permalink
SAK-42648 - Only set the start/end times if validation doesn't fail, …
Browse files Browse the repository at this point in the history
…otherwise the dates will get wiped out (since there really are no times in there) and reset to the current time. (sakaiproject#7604)
  • Loading branch information
maurercw authored and Miguel Pellicer committed Nov 28, 2019
1 parent bfa11c8 commit e3f4efd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -709,16 +709,16 @@ public void validateNewMeeting(ActionEvent e) {
Date eventStartTime = signupMeeting.getStartTime();
/*user defined own TS case*/
if(isUserDefinedTS()){
eventEndTime= getUserDefineTimeslotBean().getEventEndTime();
eventStartTime = getUserDefineTimeslotBean().getEventStartTime();
/*pass the value since they are null*/
this.signupMeeting.setStartTime(eventStartTime);
this.signupMeeting.setEndTime(eventEndTime);

if(getUserDefineTimeslotBean().getDestTSwrpList()==null || getUserDefineTimeslotBean().getDestTSwrpList().isEmpty()){
validationError = true;
Utilities.addErrorMessage(Utilities.rb.getString("event.create_custom_defined_TS_blocks"));
return;
} else {
eventEndTime = getUserDefineTimeslotBean().getEventEndTime();
eventStartTime = getUserDefineTimeslotBean().getEventStartTime();
/*pass the value since they are null*/
this.signupMeeting.setStartTime(eventStartTime);
this.signupMeeting.setEndTime(eventEndTime);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,16 +382,16 @@ public void validateCopyMeeting(ActionEvent e) {

/*user defined own TS case*/
if(isUserDefinedTS()){
eventEndTime= getUserDefineTimeslotBean().getEventEndTime();
eventStartTime = getUserDefineTimeslotBean().getEventStartTime();
/*pass the value since they may be null*/
this.signupMeeting.setStartTime(eventStartTime);
this.signupMeeting.setEndTime(eventEndTime);

if(getUserDefineTimeslotBean().getDestTSwrpList()==null || getUserDefineTimeslotBean().getDestTSwrpList().isEmpty()){
validationError = true;
Utilities.addErrorMessage(Utilities.rb.getString("event.create_custom_defined_TS_blocks"));
return;
} else {
eventEndTime = getUserDefineTimeslotBean().getEventEndTime();
eventStartTime = getUserDefineTimeslotBean().getEventStartTime();
/*pass the value since they may be null*/
this.signupMeeting.setStartTime(eventStartTime);
this.signupMeeting.setEndTime(eventEndTime);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,12 +620,13 @@ public void validateModifyMeeting(ActionEvent e) {

/*user defined own TS case*/
if(isUserDefinedTS()){
eventEndTime= getUserDefineTimeslotBean().getEventEndTime();
eventStartTime = getUserDefineTimeslotBean().getEventStartTime();
if(getUserDefineTimeslotBean().getDestTSwrpList()==null || getUserDefineTimeslotBean().getDestTSwrpList().isEmpty()){
validationError = true;
Utilities.addErrorMessage(Utilities.rb.getString("event.create_custom_defined_TS_blocks"));
return;
} else {
eventEndTime= getUserDefineTimeslotBean().getEventEndTime();
eventStartTime = getUserDefineTimeslotBean().getEventStartTime();
}

}
Expand Down

0 comments on commit e3f4efd

Please sign in to comment.