details: https://code.openbravo.com/erp/devel/pi/rev/11df05ad2807
changeset: 32613:11df05ad2807
user: Carlos Aristu <carlos.aristu <at> openbravo.com>
date: Mon Sep 04 09:23:10 2017 +0200
summary: fixes bug 36763: Audit info not updated when replacing an already
attached file
The audit information (updated, updated by fields) of the attachments was not
being updated after replacing an already attached file. In this case the
OBInterceptor was not being invoked because the information of the attachment
(BaseOBObject) was indeed not changing.
To fix this problem we explicitly change the 'updated' date of the attachment
and the OBInterceptor will take care of update the rest of the audit
information (updated by).
diffstat:
modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java
| 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r 1e69815c84cb -r 11df05ad2807
modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java
---
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java
Fri Sep 01 14:15:27 2017 +0200
+++
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java
Mon Sep 04 09:23:10 2017 +0200
@@ -148,6 +148,9 @@
} else {
attachMethod = AttachmentUtils.getDefaultAttachmentMethod();
}
+ // The information of the existing attachment may have not changed.
Force the update of the
+ // 'updated' field, the rest of the audit information will be updated
automatically.
+ attachment.setUpdated(new Date());
}
attachment.setOrganization(org);
String strDataType = null;
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits