Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019382Openbravo ERPA. Platformpublic2011-12-28 12:112012-01-24 13:34
jecharri 
alostale 
urgentmajoralways
closedfixed 
5
pi 
3.0MP8 
Google Chrome
Core
No
0019382: The flag "Trigger Autosave" is not being considered
The flag "Trigger Autosave" is not being considered.

When you are in window "Tables and Columns" and you are defining the value of the "reference" of the column, if you choose "Button", you will see the checkbox "Triggers Autosave". This is the checkbox that is not being considered when you are in one window with this button.

Summary:
-When you have the checkbox "Triggers Autosave" checked the button must be undisplayed until you save or fill all of mandatory fields.
-When you have the checkbox "Triggers Autosave" unchecked the button must be displayed all the time.
As "System" go to window "Tables and Columns" and go to table "c_invoice".

Select the columns "CreateFrom" and "CopyFrom" and uncheck the checkbox "Triggers Autosave".

Do "ant smartbuild" and restart Tomcat.

Now as Admin go to window sales invoice and you will see that you are not able to see the buttons until you have saved the record or fill all of mandatory fields.
No tags attached.
related to defect 00184543.0MP5 closed mtaal [Processes & Pickers] Process buttons are visible even when not actionable 
related to defect 00187603.0MP5 closed mtaal [Processes & Pickers] Move focus back to header after having completed a process 
related to defect 0019619 closed alostale Financial Account window: Transaction tab does not get refreshed 
Issue History
2011-12-28 12:11jecharriNew Issue
2011-12-28 12:11jecharriAssigned To => alostale
2011-12-28 12:11jecharriWeb browser => Google Chrome
2011-12-28 12:11jecharriModules => Core
2011-12-28 12:11jecharriResolution time => 1331506800
2011-12-28 12:11jecharriWeb browserGoogle Chrome => Google Chrome
2011-12-28 12:11jecharriPriorityurgent => high
2011-12-28 12:20jecharriWeb browserGoogle Chrome => Google Chrome
2011-12-28 12:20jecharriPriorityhigh => urgent
2011-12-28 12:20jecharriSeverityminor => major
2011-12-28 12:21jecharriWeb browserGoogle Chrome => Google Chrome
2011-12-28 12:21jecharriResolution time1331506800 => 1328482800
2011-12-28 12:21jecharriTarget Version3.0MP9 => 3.0MP8
2011-12-28 12:21jecharriRelationship addedrelated to 0018454
2012-01-10 15:08alostaleRelationship addedrelated to 0018760
2012-01-10 15:08alostaleNote Added: 0044187
2012-01-10 15:17hgbotCheckin
2012-01-10 15:17hgbotNote Added: 0044189
2012-01-10 15:17hgbotStatusnew => resolved
2012-01-10 15:17hgbotResolutionopen => fixed
2012-01-10 15:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/54b73b9d08f3776b0bcb965fd7bbad6ab6df3e2d [^]
2012-01-10 17:34hgbotCheckin
2012-01-10 17:34hgbotNote Added: 0044206
2012-01-10 17:35alostaleNote Added: 0044207
2012-01-12 16:49iperdomoNote Added: 0044303
2012-01-12 17:19iperdomoNote Added: 0044304
2012-01-12 17:28iperdomoNote Added: 0044305
2012-01-12 17:31iperdomoNote Added: 0044306
2012-01-12 17:38iperdomoNote Added: 0044307
2012-01-12 17:40iperdomoNote Added: 0044309
2012-01-14 21:21hudsonbotCheckin
2012-01-14 21:21hudsonbotNote Added: 0044351
2012-01-14 21:21hudsonbotCheckin
2012-01-14 21:21hudsonbotNote Added: 0044361
2012-01-20 12:04hgbotCheckin
2012-01-20 12:04hgbotNote Added: 0044464
2012-01-24 11:09iperdomoNote Added: 0044501
2012-01-24 11:09iperdomoStatusresolved => closed
2012-01-24 13:34hudsonbotCheckin
2012-01-24 13:34hudsonbotNote Added: 0044504
2012-02-06 12:57alostaleRelationship addedrelated to 0019619

Notes
(0044187)
alostale   
2012-01-10 15:08   
The changes to fix this issue affect:
 -Logic to display hide buttons: non-autosave buttons are displayed even mandatory fields are empty
 -Record refresh after process execution: non-autosave buttons do not refresh record because unsaved changes would be automatically saved or lost.
 -When executing a process defined in parent record, issue 0018760 moves focus to parent. This behavior is disabled for non-autosave as moving focus forces save.

== Regression risk ==
The risk is to make previous logic to stop working. All regression prone situations are covered by the following test plan.

== Test plan ==

All test are executed by setting not to trigger autosave to "Create Fields" button in "Window Tab and Fields > Tab" tab.

 * Select a Window, go to Tab in grid mode
   ** Do not select any record
     *** "Copy Window Tabs" should be shown (parent button)
     *** No other button is shown
   ** Select a record
     *** The 3 buttons should be shown
   ** Create new record in grid (do not fill "Name" field)
     *** Create Fields button should be shown
     *** No other button should be shown
   ** Execute Create Fields process
     *** An error is displayed (no record_id) which is correct
     *** Changes in new record are not saved
   ** Fill "Name" field
      *** The 3 buttons should be shown
   ** Create new record in form (do not fill "Name" field)
     *** Create Fields button should be shown
     *** No other button should be shown
   ** Execute Create Fields process
     *** The request sends all existent info in the new record
     *** An error is displayed (no record_id) which is correct
     *** Changes in new record are not saved
   ** Fill "Name" field
     *** The 3 buttons should be shown
   ** Select an existent record in grid
     *** The 3 buttons should be shown
   ** Open an existent record in form
     *** The 3 buttons should be shown
 * Select a Window, select a Tab, go to Field in grid mode
   ** Do not select any record
     *** "Create Fields" and "Copy Window Tabs" should be shown (parent buttons)
   ** Create new record in grid (do not fill "Name" field)
     *** Create Fields button should be shown
     *** No other button should be shown
   ** Execute Create Fields process
     *** The request sends all existent info in the new record
     *** An error is displayed (no record_id) which is correct
     *** Changes in new record are not saved
   ** Fill "Name" field
      *** The 2 buttons should be shown
   ** Create new record in form (do not fill "Name" field)
     *** Create Fields button should be shown
     *** No other button should be shown
   ** Fill "Name" field
     *** The 2 buttons should be shown
   ** Select an existent record in grid
     *** The 2 buttons should be shown
   ** Open an existent record in form
     *** The 2 buttons should be shown

* Select a existent window, tab and remove a field, execute create fields
  ** Field is recreated but not refreshed
* Delete a field and execute the process from field tab
  ** Field is recreated but not refreshed
  ** Focus is still on field tab
* Do modifications on a field, Execute Copy Tab Fields process
  ** Changes on field are saved
  ** Fields are refreshed
  ** Focus goes to header

Add @SeqNo@!20 as display logic for Create Fields and Copy Tab Fields Tab buttons
  * Select in grid a Tab with seqno=10
    ** The 3 buttons are shown
  * Select in grid a Tab with seqno=20
    ** Only Copy Window Tabs button is shown
  * Create a new Tab with seqno = 20 (by default)
    ** No button is shown till mandatory fields are filled
  * Create a new Tab with seqno != 20
    ** Create Fields button is shown
  * Select in form a Tab with seqno=10
    ** The 3 buttons are shown
  * Select in form a Tab with seqno=20
    ** Only Copy Window Tabs button is shown
(0044189)
hgbot   
2012-01-10 15:17   
Repository: erp/devel/pi
Changeset: 54b73b9d08f3776b0bcb965fd7bbad6ab6df3e2d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jan 10 15:16:05 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/54b73b9d08f3776b0bcb965fd7bbad6ab6df3e2d [^]

fixed bug 19382: implemented 'triggers autosave' in buttons

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0044206)
hgbot   
2012-01-10 17:34   
Repository: erp/devel/pi
Changeset: 99cab44d0c25545406564eb4d788d0ef18f6b1bd
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jan 10 17:33:39 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/99cab44d0c25545406564eb4d788d0ef18f6b1bd [^]

related to issue 19382: Multiple selection hides all buttons

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0044207)
alostale   
2012-01-10 17:35   
To include in the test plan:

Selecting multiple rows hides all buttons but the ones defined within parent tab.
(0044303)
iperdomo   
2012-01-12 16:49   
Code Review:

An email was sent with the proposed changes, basically 2 things:
a) instead of startsWith (a SmartClient function) use indexOf('something') === 0
b) Part of some code was duplicated in an *if* branch. A inner function could be used by adding a flag
(0044304)
iperdomo   
2012-01-12 17:19   
* Select a Window, go to Tab in grid mode
   ** Do not select any record
     *** "Copy Window Tabs" should be shown (parent button) - OK
     *** No other button is shown - OK
   ** Select a record
     *** The 3 buttons should be shown - OK
   ** Create new record in grid (do not fill "Name" field)
     *** Create Fields button should be shown - OK
     *** No other button should be shown - OK
   ** Execute Create Fields process
     *** An error is displayed (no record_id) which is correct - OK
     *** Changes in new record are not saved - OK
   ** Fill "Name" field
      *** The 3 buttons should be shown - OK
   ** Create new record in form (do not fill "Name" field)
     *** Create Fields button should be shown - OK
     *** No other button should be shown - OK
   ** Execute Create Fields process
     *** The request sends all existent info in the new record - OK
     *** An error is displayed (no record_id) which is correct - OK
     *** Changes in new record are not saved - OK
   ** Fill "Name" field
     *** The 3 buttons should be shown - OK
   ** Select an existent record in grid
     *** The 3 buttons should be shown - OK
   ** Open an existent record in form
     *** The 3 buttons should be shown - OK
(0044305)
iperdomo   
2012-01-12 17:28   
* Select a Window, select a Tab, go to Field in grid mode
   ** Do not select any record
     *** "Create Fields" and "Copy Window Tabs" should be shown (parent buttons) - OK
   ** Create new record in grid (do not fill "Name" field)
     *** Create Fields button should be shown - OK
     *** No other button should be shown - OK
   ** Execute Create Fields process
     *** The request sends all existent info in the new record
     *** An error is displayed (no record_id) which is correct - OK (Note: The process must work since we are in the context of a tab)
     *** Changes in new record are not saved
   ** Fill "Name" field
      *** The 2 buttons should be shown - OK
   ** Create new record in form (do not fill "Name" field)
     *** Create Fields button should be shown - OK
     *** No other button should be shown - OK
   ** Fill "Name" field
     *** The 2 buttons should be shown - OK
   ** Select an existent record in grid
     *** The 2 buttons should be shown - OK
   ** Open an existent record in form
     *** The 2 buttons should be shown - OK
(0044306)
iperdomo   
2012-01-12 17:31   
* Select a existent window, tab and remove a field, execute create fields
  ** Field is recreated but not refreshed - OK
* Delete a field and execute the process from field tab
  ** Field is recreated but not refreshed - OK
  ** Focus is still on field tab - OK
* Do modifications on a field, Execute Copy Tab Fields process
  ** Changes on field are saved - OK
  ** Fields are refreshed - OK
  ** Focus goes to header - OK
(0044307)
iperdomo   
2012-01-12 17:38   
Add @SeqNo@!20 as display logic for Create Fields and Copy Tab Fields Tab buttons
  * Select in grid a Tab with seqno=10
    ** The 3 buttons are shown - OK
  * Select in grid a Tab with seqno=20
    ** Only Copy Window Tabs button is shown - OK? Also "Copy Tab Fields"
  * Create a new Tab with seqno = 20 (by default)
    ** No button is shown till mandatory fields are filled - OK
  * Create a new Tab with seqno != 20
    ** Create Fields button is shown - OK
  * Select in form a Tab with seqno=10
    ** The 3 buttons are shown - OK
  * Select in form a Tab with seqno=20
    ** Only Copy Window Tabs button is shown - OK? Also "Copy Tab Fields"
(0044309)
iperdomo   
2012-01-12 17:40   
Selecting multiple rows hides all buttons but the ones defined within parent tab - OK
(0044351)
hudsonbot   
2012-01-14 21:21   
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/0f91795528e4 [^]

Maturity status: Test
(0044361)
hudsonbot   
2012-01-14 21:21   
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/0f91795528e4 [^]

Maturity status: Test
(0044464)
hgbot   
2012-01-20 12:04   
Repository: erp/devel/pi
Changeset: 20fc93af53444820969647a9117f6b000fb00d14
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jan 20 12:02:29 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/20fc93af53444820969647a9117f6b000fb00d14 [^]

related to issue 19382: applied code review

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
---
(0044501)
iperdomo   
2012-01-24 11:09   
Added documentation in the specific behavior of a button that doesn't trigger autosave:
http://wiki.openbravo.com/wiki/Data_Model#Button [^]
(0044504)
hudsonbot   
2012-01-24 13:34   
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/9a942bd15053 [^]

Maturity status: Test