Index: grails-app/services/com/lemans/ds/qualitycontrol/QcRejectionLogService.groovy =================================================================== diff -u -r1ad3b081c7e993e58114e6b7b55c0f6fc561c166 -rdd1e2ff21d99980d8515eddfbba5e4e02137df11 --- grails-app/services/com/lemans/ds/qualitycontrol/QcRejectionLogService.groovy (.../QcRejectionLogService.groovy) (revision 1ad3b081c7e993e58114e6b7b55c0f6fc561c166) +++ grails-app/services/com/lemans/ds/qualitycontrol/QcRejectionLogService.groovy (.../QcRejectionLogService.groovy) (revision dd1e2ff21d99980d8515eddfbba5e4e02137df11) @@ -9,7 +9,7 @@ class QcRejectionLogService extends LemansManager { private static final String UPDATE_REJECT_MESSAGE = '''UPDATE QC.RejectionLog SET rejectionMessage = :message, jiraId = :jiraTicketNumber, rejectionDate = :now, rejectedBy = :username - WHERE parentEntity = :entity AND parentEntityId = :entityId AND qcChangeGroupId = :qcChangeGroupId''' + WHERE parentEntity = :entity AND parentEntityId = :entityId AND (qcChangeGroupId = :qcChangeGroupId OR :qcChangeGroupId IS NULL)''' private static final String INSERT_REJECT_MESSAGE = '''INSERT INTO QC.RejectionLog(parentEntity, parentEntityId, qcChangeGroupId, jiraId, rejectionMessage, rejectionDate, rejectedBy) values(:parentEntity, :parentEntityId, :qcChangeGroupId, :jiraTicketNumber, :message, :now, :username)'''