Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036763Openbravo ERPA. Platformpublic2017-09-01 12:482017-09-21 16:49
ngarcia 
caristu 
immediateminoralways
closedfixed 
5
 
3.0PR17Q4 
alostale
Core
Production - Confirmed Stable
2016-04-18
3.0PR16Q3
https://code.openbravo.com/erp/devel/pi/rev/82f27ac1b1497b3a82646b140ab1b6e048f2b766 [^]
No
0036763: Update information of attachments is not changed after replacing an already attached file
Update information of attachments is not changed after replacing an already attached file.

It seems the updated column of the c_file table is not updated when a file is replaced
As group admin role:
   Go to Sales Invoice window
   Add an attachment to it
   Wait at least a minute in order to see its update information as '1 minutes ago by ...'
   Modify the file
   Add it again to the same invoice
   The applications shows:
   "The file you are trying to upload already exists, so it will be replaced by the new one. Are you sure you want to continue?"
   Select OK

   Check the update information remains the same. It should be updated to '0 minutes ago by ...'
No tags attached.
depends on backport 00367653.0PR17Q3 closed caristu Update information of attachments is not changed after replacing an already attached file 
depends on backport 00367663.0PR17Q2.3 closed caristu Update information of attachments is not changed after replacing an already attached file 
depends on backport 00367673.0PR17Q1.4 closed caristu Update information of attachments is not changed after replacing an already attached file 
caused by feature request 0029771 closed naiaramartinez different attachment method infrastructure 
Issue History
2017-09-01 12:48ngarciaNew Issue
2017-09-01 12:48ngarciaAssigned To => platform
2017-09-01 12:48ngarciaModules => Core
2017-09-01 12:48ngarciaTriggers an Emergency Pack => No
2017-09-01 12:48ngarciaIssue Monitored: networkb
2017-09-01 13:03ngarciaRelationship addedrelated to 0029771
2017-09-01 14:46caristuRegression level => Production - Confirmed Stable
2017-09-01 14:46caristuRegression date => 2016-04-18
2017-09-01 14:46caristuRegression introduced in release => 3.0PR16Q3
2017-09-01 14:46caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/82f27ac1b1497b3a82646b140ab1b6e048f2b766 [^]
2017-09-01 14:46caristuAssigned Toplatform => caristu
2017-09-01 14:46caristuRelationship deletedrelated to 0029771
2017-09-01 14:46caristuRelationship addedcaused by 0029771
2017-09-01 14:48caristuNote Added: 0098780
2017-09-01 14:49caristuStatusnew => scheduled
2017-09-01 14:49caristuNote Edited: 0098780bug_revision_view_page.php?bugnote_id=0098780#r15787
2017-09-01 14:50caristuNote Edited: 0098780bug_revision_view_page.php?bugnote_id=0098780#r15788
2017-09-01 14:50caristuNote Edited: 0098780bug_revision_view_page.php?bugnote_id=0098780#r15789
2017-09-01 15:10caristuNote Edited: 0098780bug_revision_view_page.php?bugnote_id=0098780#r15790
2017-09-04 10:15hgbotCheckin
2017-09-04 10:15hgbotNote Added: 0098793
2017-09-04 10:15hgbotStatusscheduled => resolved
2017-09-04 10:15hgbotResolutionopen => fixed
2017-09-04 10:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/11df05ad2807d9965f0623a95d23078564644bad [^]
2017-09-04 10:16caristuReview Assigned To => alostale
2017-09-11 12:06hgbotCheckin
2017-09-11 12:06hgbotNote Added: 0098935
2017-09-12 13:19hgbotCheckin
2017-09-12 13:19hgbotNote Added: 0098981
2017-09-12 13:53alostaleNote Added: 0098983
2017-09-12 13:53alostaleStatusresolved => closed
2017-09-12 13:53alostaleFixed in Version => 3.0PR17Q4
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099354
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099373
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099381

Notes
(0098780)
caristu   
2017-09-01 14:48   
(edited on: 2017-09-01 15:10)
Since [1] the TabAttachments class updates the attachment information in a different way. After that changeset the audit info (updated, updated by) is not being updated for existing attachments.

That is because the information of the Attachment DAL object is not being modified. Therefore Dal is not detecting the object as dirty, so the interceptor is not invoked so the the audit information is not updated.

[1] https://code.openbravo.com/erp/devel/pi/rev/82f27ac1b1497b3a82646b140ab1b6e048f2b766 [^]

(0098793)
hgbot   
2017-09-04 10:15   
Repository: erp/devel/pi
Changeset: 11df05ad2807d9965f0623a95d23078564644bad
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Sep 04 09:23:10 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/11df05ad2807d9965f0623a95d23078564644bad [^]

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).

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java
---
(0098935)
hgbot   
2017-09-11 12:06   
Repository: erp/devel/pi
Changeset: 3111a27e8c2978b71a547ad24926dacc5243f9de
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Sep 11 12:05:17 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3111a27e8c2978b71a547ad24926dacc5243f9de [^]

related to bug 36763: Update attachment last update when metadata also changes

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentUtils.java
---
(0098981)
hgbot   
2017-09-12 13:19   
Repository: erp/devel/pi
Changeset: b78d862f32f3f725b4f8b3990dd832d8a989820b
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Sep 12 13:15:31 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b78d862f32f3f725b4f8b3990dd832d8a989820b [^]

related to bug 36763: last update not updated when removing description

  The last updated information is now updated when the description of an existing attachment is cleared. This was not happening before, because the record in the OBUIAPP_Parameter_Value table was removed when the value to be assigned is null

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java
---
(0098983)
alostale   
2017-09-12 13:53   
reviewed

tested cases:

1. replaced file with same name
2. edited description
3. having a description, it gets removed
4. adding modifications in an extra parameter in attachment method
(0099354)
hudsonbot   
2017-09-21 16:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test
(0099373)
hudsonbot   
2017-09-21 16:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test
(0099381)
hudsonbot   
2017-09-21 16:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test