Skip to content

Commit

Permalink
Merge pull request #1258 from openlibraryenvironment/OLE-9423
Browse files Browse the repository at this point in the history
OLE-9423 : Operator ID is not correctly captured in ole_rnwl_history_t table
  • Loading branch information
NSSuresh11 authored Mar 6, 2019
2 parents 8509235 + 171b42b commit ae92e3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2493,7 +2493,7 @@ public ModelAndView renewalItem(@ModelAttribute("KualiForm") UifFormBase form, B
oleRenewalHistory.setItemBarcode(oleLoanDocument.getItemId());
oleRenewalHistory.setItemId(oleLoanDocument.getItemUuid());
oleRenewalHistory.setLoanId(oleLoanDocument.getLoanId());
oleRenewalHistory.setOperatorId(oleLoanDocument.getLoanOperatorId());
oleRenewalHistory.setOperatorId(GlobalVariables.getUserSession().getPrincipalId());
oleRenewalHistory.setPatronBarcode(oleLoanForm.getPatronBarcode());
oleRenewalHistory.setRenewalDueDate(oleLoanDocument.getLoanDueDate());
oleRenewalHistory.setRenewedDate(new Timestamp(System.currentTimeMillis()));
Expand Down Expand Up @@ -2621,7 +2621,7 @@ public ModelAndView renewalItems(@ModelAttribute("KualiForm") UifFormBase form,
oleRenewalHistory.setItemBarcode(loanDocument.getItemId());
oleRenewalHistory.setItemId(loanDocument.getItemUuid());
oleRenewalHistory.setLoanId(loanDocument.getLoanId());
oleRenewalHistory.setOperatorId(loanDocument.getLoanOperatorId());
oleRenewalHistory.setOperatorId(GlobalVariables.getUserSession().getPrincipalId());
oleRenewalHistory.setPatronBarcode(loanDocument.getPatronBarcode());
oleRenewalHistory.setRenewalDueDate(loanDocument.getLoanDueDate());
oleRenewalHistory.setRenewedDate(new Timestamp(System.currentTimeMillis()));
Expand Down Expand Up @@ -2793,7 +2793,7 @@ public ModelAndView overrideRenewItems(@ModelAttribute("KualiForm") UifFormBase
oleRenewalHistory.setItemBarcode(loanDocument.getItemId());
oleRenewalHistory.setItemId(loanDocument.getItemUuid());
oleRenewalHistory.setLoanId(loanDocument.getLoanId());
oleRenewalHistory.setOperatorId(loanDocument.getLoanOperatorId());
oleRenewalHistory.setOperatorId(GlobalVariables.getUserSession().getPrincipalId());
oleRenewalHistory.setPatronBarcode(oleLoanForm.getPatronBarcode());
oleRenewalHistory.setRenewalDueDate(loanDocument.getLoanDueDate());
oleRenewalHistory.setRenewedDate(new Timestamp(System.currentTimeMillis()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.kuali.ole.utility.OleStopWatch;
import org.kuali.rice.core.api.config.property.ConfigContext;
import org.kuali.rice.krad.service.BusinessObjectService;
import org.kuali.rice.krad.util.GlobalVariables;

import java.sql.Timestamp;
import java.util.*;
Expand Down Expand Up @@ -210,7 +211,7 @@ private OleRenewalHistory updateRenewalHistoryRecord(OleLoanDocument oleLoanDocu
oleRenewalHistory.setItemBarcode(oleLoanDocument.getItemId());
oleRenewalHistory.setItemId(oleLoanDocument.getItemUuid());
oleRenewalHistory.setLoanId(oleLoanDocument.getLoanId());
oleRenewalHistory.setOperatorId(oleLoanDocument.getLoanOperatorId());
oleRenewalHistory.setOperatorId(GlobalVariables.getUserSession().getPrincipalId());
oleRenewalHistory.setPatronBarcode(null != oleLoanDocument.getOlePatron() ? oleLoanDocument.getOlePatron().getBarcode() : oleLoanDocument.getPatronBarcode());
oleRenewalHistory.setRenewalDueDate(oleLoanDocument.getLoanDueDate());
oleRenewalHistory.setRenewedDate(new Timestamp(System.currentTimeMillis()));
Expand Down

0 comments on commit ae92e3b

Please sign in to comment.