Closed litzvi closed 3 years ago
The problem is adding an approval for a user will add approvals from beginning of time.
Or maybe remove the connection between the approval and status.
The problem is adding an approval for a user will add approvals from beginning of time.
only need to approve not finalized processes.
com.avc.mis.beta.dao.ProcessInfoDAO.setProcessStatus(ProcessStatus, Integer) - find needed approvals left join approvals
if(getProcessRepository().waitingApprovals(processId).size() > 0) {
throw new IllegalStateException("Can't finalize process before fully approved");
}
// List
old code:
Optional
@litzvi don't use com.avc.mis.beta.repositories.ProcessInfoRepository.findApprovals(Integer, DecisionType[], Instant, Instant). Change to a dedicated method to get the report.
@litzvi don't use com.avc.mis.beta.repositories.ProcessInfoRepository.findApprovals(Integer, DecisionType[], Instant, Instant). Change to a dedicated method to get the report.
done
A little bizarre bug we had this morning. I removed approval for Eli in receipts but left the Management. There are still lots from last week in pending - therefore they still require approval. But he couldn't finalize the lot because you removed the confirm button based on current requirements.
Managed to get around it for now.
They way I designed it, approval requirements aren't changed retroactively. Therefore shouldn't depend on management configuration but on given process. Perhaps it should be changed, so I need to change the design for flexible approval. Create approval/rejection when added.