ua-eas/ksd-kc5.2.1-ua — pull request #51 by nataliac06 (2014-10-16 00:52:52+00:00)
Title: UAR-760 Eliminating duplicating in the database the acctual attached files when an ammendment/renewal is integrated back into the main protocol

When a protocol has an amendment/renewal that gets approved, the a/r is 'merged' into the main protocol, then a new version of the protocol is created with this data. Also the amendment itself and the old protocol get the status set to 'Inactive' and the new one becomes the active version.
In the foundation code, when the new protocol is created, all the attachment files are duplicated in the db as well (taking up a lot of additional stuff, although they haven't been changed).
This fix removes this duplication by avoiding creating new attachment files in the database (not setting the fileId to null, like it's a new attachment).
Note: The duplication did not happen in 3.1.1. I've left the original code from 5.2.1 commented out just to make sure that we don't have additional unforeseen secondary effects by not duplicating the attachment files.