Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028451
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorsometimes2014-12-18 16:472014-12-29 16:47
ReporteraaroncaleroView Statuspublic 
Assigned Toaaroncalero 
PrioritynormalResolutionfixedFixed in VersionRR15Q1
StatusclosedFix in branchpiFixed in SCM revision96fde12e1b53
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028451: If the apply button on the Receipt Discounts tab is tapped before the discounts combo is loaded, a javascript error is shown

DescriptionIf the apply button on the Receipt Discounts tab is tapped before the discounts combo is loaded, a javascript error is shown
Steps To ReproduceThese steps can be reproduced during automated tests
Create a ticket in Web POS
Open the menu, Receipt Discounts menu entry.
Click on the apply to all lines check.
Click on Apply.

If the discounts combo is not loaded yet, the following error is shown:
Uncaught TypeError: Cannot read property 'model' of undefined

Alternative steps to reproduce using the TestRegistry:
Create a new ticket.
Execute the following commands on the browser console in a single line:
TestRegistry.registry('menuHolder_mainMenuButton').enyoObject.waterfall('ontap');
TestRegistry.registry('menuScroller_menuDiscounts').enyoObject.waterfall('ontap');
TestRegistry.registry('discountsEdit_checkSelectAll').enyoObject.waterfall('ontap');
TestRegistry.registry('discountsEdit_btnApply').enyoObject.waterfall('ontap');

These commands will open the Receipt Discounts tab and apply the first discount to all lines.
Proposed SolutionWhen the Receipt discounts tab is shown, the discounts combo is reset. The Apply button should only be enabled after the discounts combo has finished reloading.
In order to ensure this:
The Apply button will be disabled right before resetting the discounts combo.
After the discounts combo is reloaded we will call ticketLineChecked with the current checked lines to enable the button if needed.
The ticketLineChecked function will have a check to enable the Apply button only if the discounts combo is enabled.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0072706)
hgbot (developer)
2014-12-18 17:15

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 96fde12e1b53c1ed1103a988ce45dc5a1589d3cc
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Thu Dec 18 17:13:43 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/96fde12e1b53c1ed1103a988ce45dc5a1589d3cc [^]

Fixed issue 28451: If the apply button on the Receipt Discounts tab is tapped before the discounts combo is loaded, a javascript error is shown

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/ticketdiscount.js
---
(0072851)
mtaal (manager)
2014-12-29 14:09

Hi,
I can still reproduce the issue using the testregistry code. See the attached screenshot
the comp variable seems undefined.

gr. Martin
(0072855)
mtaal (manager)
2014-12-29 16:38

.
(0072856)
mtaal (manager)
2014-12-29 16:45
edited on: 2014-12-29 16:47

Re-opened for incorrect reason, setting back to resolved,

Remark by developer:

[15:34:48] Aarón Calero: I've reviewed the issue and the testregistry code fails because it ignores if buttons are disabled or not
[15:36:39] Aarón Calero: The error will never happen neither manually nor during a test (our test infrastructure checks if buttons are disabled before tapping them)

(0072857)
mtaal (manager)
2014-12-29 16:47

Tested and reviewed

- Issue History
Date Modified Username Field Change
2014-12-18 16:47 aaroncalero New Issue
2014-12-18 16:47 aaroncalero Assigned To => aaroncalero
2014-12-18 16:47 aaroncalero Triggers an Emergency Pack => No
2014-12-18 17:15 hgbot Checkin
2014-12-18 17:15 hgbot Note Added: 0072706
2014-12-18 17:16 hgbot Status new => resolved
2014-12-18 17:16 hgbot Resolution open => fixed
2014-12-18 17:16 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/96fde12e1b53c1ed1103a988ce45dc5a1589d3cc [^]
2014-12-29 14:09 mtaal Note Added: 0072851
2014-12-29 14:09 mtaal Status resolved => new
2014-12-29 14:09 mtaal Resolution fixed => open
2014-12-29 16:38 mtaal Status new => scheduled
2014-12-29 16:38 mtaal Note Added: 0072855
2014-12-29 16:38 mtaal fix_in_branch => pi
2014-12-29 16:45 mtaal Note Added: 0072856
2014-12-29 16:45 mtaal Status scheduled => resolved
2014-12-29 16:45 mtaal Fixed in Version => RR15Q1
2014-12-29 16:45 mtaal Resolution open => fixed
2014-12-29 16:47 mtaal Note Edited: 0072856 View Revisions
2014-12-29 16:47 mtaal Review Assigned To => mtaal
2014-12-29 16:47 mtaal Note Added: 0072857
2014-12-29 16:47 mtaal Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker