ua-eas/ksd-kc5.2.1-ua — pull request #98 by nataliac06 (2014-11-25 21:25:45+00:00)
Title: UAR-840: Hidden exception prevents amendment merging back into main protocol after SMR approved

Issue1: Due to lazy loading on the protocol object for collections, when the protocol is versioned prior to merging an amendment,it had objects with null ids inside the collections. So when trying to save it back to the DB, OJB was thinking that we are trying to delete those objects.
Solution: Add all protocol collections to ProtocolVersionServiceImplBase.materializeCollections and issue a call to this method prior to saving the initial protocol during versioning

Issue2: ProtocolActionType.RESPONSE_APPROVAL was not set as an acceptable "approval" action, which determined getLastApprovalAction() to return null, and that caused ProtocolDocumentBase to throw and silently catch an exception and not merge the amenment back
Solution: added ProtocolActionType.RESPONSE_APPROVAL and refactored getLastApprovalAction() in ProtocolVersionServiceImplBase and also added logging to ProtocolDocumentBase, especially where we have silent catches.