Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025158Openbravo ERPA. Platformpublic2013-11-14 14:372013-12-22 19:41
jonalegriaesarte 
dbaz 
normalmajorhave not tried
closedfixed 
5
pi 
3.0MP313.0MP31 
AugustoMauch
Core
Production - Confirmed Stable
2013-02-15
https://code.openbravo.com/erp/devel/pi/rev/57378b7ff2bd [^]
No
0025158: Uploaded image cannot be deleted
If in a record with image reference, you upload an image, you cannot delete it in the record
    As "Openbravo Admin"
* Go to "Product" window
* Select any existing record (in form view)
* Click in the "upload" button of the image
* Upload any file
* Save the record
* Close the record (go back to grid mode)
* Open again the record in form view
* Click the delete button of the image input
* Save the record
* Close the record (go back to grid mode)
* Open again the record in form view

The image is still there.
No tags attached.
related to design defect 0023600 acknowledged Triage Platform Base Image selector is not properly updated/cleared when organization field changes 
has duplicate defect 0023599 closed AugustoMauch Uploaded image cannot be deleted 
related to defect 00262533.0PR14Q3 closed guillermogil Trash button in product window, image field is not removing the image from database 
Issue History
2013-11-14 14:37jonalegriaesarteNew Issue
2013-11-14 14:37jonalegriaesarteAssigned To => AugustoMauch
2013-11-14 14:37jonalegriaesarteModules => Core
2013-11-14 14:37jonalegriaesarteTriggers an Emergency Pack => No
2013-11-14 14:38jonalegriaesarteRelationship addedhas duplicate 0023599
2013-11-14 14:38jonalegriaesarteRelationship addedrelated to 0023600
2013-12-19 09:13alostaleAssigned ToAugustoMauch => dbaz
2013-12-20 22:09dbazRegression level => Production - Confirmed Stable
2013-12-20 22:09dbazRegression date => 2013-02-15
2013-12-20 22:09dbazRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/57378b7ff2bd [^]
2013-12-20 22:55dbazNote Added: 0063035
2013-12-20 22:59dbazNote Edited: 0063035bug_revision_view_page.php?bugnote_id=0063035#r5280
2013-12-20 23:01hgbotCheckin
2013-12-20 23:01hgbotNote Added: 0063036
2013-12-20 23:01hgbotStatusnew => resolved
2013-12-20 23:01hgbotResolutionopen => fixed
2013-12-20 23:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a0194e74f44635dba9cb6661f0daa101c0f2a1b5 [^]
2013-12-21 09:38hudsonbotCheckin
2013-12-21 09:38hudsonbotNote Added: 0063042
2013-12-22 19:41AugustoMauchReview Assigned To => AugustoMauch
2013-12-22 19:41AugustoMauchNote Added: 0063046
2013-12-22 19:41AugustoMauchStatusresolved => closed
2013-12-22 19:41AugustoMauchFixed in Version => 3.0MP31
2014-04-11 13:35AugustoMauchRelationship addedrelated to 0026253

Notes
(0063035)
dbaz   
2013-12-20 22:55   
(edited on: 2013-12-20 22:59)
The following changeset:

https://code.openbravo.com/erp/devel/pi/rev/57378b7ff2bd [^]

indirectly caused this issue.

The point is that when an image is deleted, the image selector internal value becomes "undefined" and then, due to this line:

https://code.openbravo.com/erp/devel/pi/file/57378b7ff2bd/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js#l254 [^]

in this function

https://code.openbravo.com/erp/devel/pi/file/57378b7ff2bd/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js#l863 [^]

This "null" value was converted to ''

Since the 19684 changeset, this doesn't happen anymore, since the original object never reach the OB.Utilities.fixNull250 function but a clone.

The fix to this issue is just ensure that if the image is deleted, the image selector internal value is '' instead of "undefined"

(0063036)
hgbot   
2013-12-20 23:01   
Repository: erp/devel/pi
Changeset: a0194e74f44635dba9cb6661f0daa101c0f2a1b5
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Dec 20 23:00:59 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a0194e74f44635dba9cb6661f0daa101c0f2a1b5 [^]

Fixed issue 25158: Now 'images' can be deleted again in form view

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-image.js
---
(0063042)
hudsonbot   
2013-12-21 09:38   
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/a0194e74f446 [^]

Maturity status: Test
(0063046)
AugustoMauch   
2013-12-22 19:41   
Code reviewed and verified in pi@a0194e74f446