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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027415
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2014-08-22 10:192015-03-06 16:57
ReporterOrekariaView Statuspublic 
Assigned Toaaroncalero 
PrioritynormalResolutionfixedFixed in VersionRR15Q2
StatusclosedFix in branchFixed in SCM revision7df040939eec
ProjectionnoneETAnoneTarget VersionRR15Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027415: Stabilization: alert("") should never be used

DescriptionIt stops the javascript heap
The browser alert is not shown in the screenshots
The test logic to detect when one is present is almost a hack. Also, the tests cannot access the content of the alert
Is also not seen when in a hangout call
Steps To ReproduceIn the WebPOS login page
Try to login with wrong credentials

Verify that an alert is shown
Proposed Solutionin ob-login.js change this code:

    var params;
    OB.UTIL.showLoggingOut(false);
    OB.MobileApp.model.on('loginfail', function (status, data) {
      var msg;
      if (data && data.messageTitle) {
        msg = data.messageTitle;
      }

      if (data && data.messageText) {
        msg += (msg ? '\n' : '') + data.messageText;
      }
      msg = msg || 'Invalid user name or password.\nPlease try again.';
      alert(msg);
      if (this.$.password) {
        this.$.password.setValue('');
      }
      if (this.$.username) {
        this.$.username.focus();
      }
    }, this);

for this one:

OB.MobileApp.model.on('loginfail', function (status, data) {
      var me = this;
      var msgTittle = 'Error';
      var msgText = 'Invalid user name or password. Please try again.';
      if (data && data.messageTitle) {
        msgTittle = data.messageTitle;
      }
      if (data && data.messageText) {
        msgText = data.messageText;
      }
      OB.UTIL.showConfirmation.display(msgTittle, msgText, [{
        label: 'OK',
        isConfirmButton: true,
        action: function () {
          if (me.$.password) {
            me.$.password.setValue('');
          }
          OB.MobileApp.model.navigate('login');
        }
      }], {
        onHideFunction: function () {
          if (me.$.password) {
            me.$.password.setValue('');
          }
          OB.MobileApp.model.navigate('login');
        }
      });
    }, this);
TagsNo tags attached.
Attached Filesdiff file icon issue-27415-posterminal.diff [^] (4,040 bytes) 2014-12-17 10:59 [Show Content]
diff file icon issue-27415-mobile-core.diff [^] (7,794 bytes) 2014-12-17 11:01 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
has duplicate design defect 0022172 closedadrianromero Information messages must be consolidated (javascript alerts) 
has duplicate design defect 0021087 closedadrianromero Different application messages formats 
blocks feature request 0027329 newRetail Stabilization: Overhaul the loading process (since the url is entered until the webpos has loaded) 
blocks feature request 0026771RR14Q3 closedOrekaria TestCases. Work in progress 
blocks feature request 0028933RR16Q1 closedRetail QA: RR15Q2: Add tests for Mobile applications 

-  Notes
(0072584)
hgbot (developer)
2014-12-16 23:33

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 469ce9f2de73f1418bc0551c00aef06cae645578
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Dec 16 23:33:00 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/469ce9f2de73f1418bc0551c00aef06cae645578 [^]

Related to issue 27415: Stabilization: alert("") should never be used
Changed alert to OB.Utils call, changed message, export database made slight change in order of foreign key definitions

---
M src-db/database/model/modifiedTables/AD_ORG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0072604)
hgbot (developer)
2014-12-17 10:57

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 410f7d5aadfc83c325bcfa829548c9590d0a1019
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Dec 17 10:56:49 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/410f7d5aadfc83c325bcfa829548c9590d0a1019 [^]

Related to issue 27415: Stabilization: alert("") should never be used, backout
Backout of changeset, will be moved/done in Q2

---
M src-db/database/model/modifiedTables/AD_ORG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0074042)
hgbot (developer)
2015-02-03 17:38

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 369babc96d637224784a31e6d62b2fd3aae3e5b5
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Tue Feb 03 17:36:44 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/369babc96d637224784a31e6d62b2fd3aae3e5b5 [^]

Related to issue 27415: Stabilization: alert() should never be used

Changed alerts to OB.Utils calls and changed message

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0074044)
hgbot (developer)
2015-02-03 17:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 7df040939eecdaefb786784b64a2a3af9c638c35
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Tue Feb 03 17:28:48 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7df040939eecdaefb786784b64a2a3af9c638c35 [^]

Fixed issue 27415: Stabilization: alert() should never be used

Changed alerts to OB.UTIL calls
Added message to replace static text
Removal of whitespaces done by the JSBeautifier

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.mobile.core/source/component/ob-login.js
M web/org.openbravo.mobile.core/source/component/obpos-approval.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0074263)
hgbot (developer)
2015-02-06 19:20

Repository: tools/automation/pi-mobile
Changeset: d664bafdc2d9b180c1061fb9482962ecfa7050fd
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Fri Feb 06 17:52:41 2015 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/d664bafdc2d9b180c1061fb9482962ecfa7050fd [^]

Related to issue 27415: Added test 'LoginWithWrongCredentialsNonSecureNoAlert'
- added annotation for version compatibility

---
M src-test/org/openbravo/test/mobile/common/selenium/javascript/TestId.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/AllLoginoutTests.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/LoginWithWrongCredentialsNonSecure.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/LoginWithWrongCredentialsNonSecureNoAlert.java
---
(0074979)
dmitry_mezentsev (developer)
2015-02-26 17:32

Guys,
Not closed for 23 days!
(0075259)
Orekaria (administrator)
2015-03-06 16:57
edited on: 2015-03-06 16:57

Suggestion: create a test that searches for the 'alert' keyword in the javascript generated file


- Issue History
Date Modified Username Field Change
2014-08-22 10:19 Orekaria New Issue
2014-08-22 10:19 Orekaria Assigned To => Orekaria
2014-08-22 10:19 Orekaria Triggers an Emergency Pack => No
2014-08-22 10:19 Orekaria Relationship added blocks 0027329
2014-08-22 10:20 Orekaria Relationship added blocks 0026771
2014-09-14 17:05 Orekaria Target Version RR14Q4 => RR15Q1
2014-09-14 17:07 Orekaria Proposed Solution updated
2014-12-08 11:51 mtaal Target Version RR15Q1 => RR15Q2
2014-12-16 23:27 mtaal Relationship added has duplicate 0022172
2014-12-16 23:33 hgbot Checkin
2014-12-16 23:33 hgbot Note Added: 0072584
2014-12-17 10:57 hgbot Checkin
2014-12-17 10:57 hgbot Note Added: 0072604
2014-12-17 10:59 mtaal File Added: issue-27415-posterminal.diff
2014-12-17 11:01 mtaal File Added: issue-27415-mobile-core.diff
2014-12-17 12:46 mtaal Relationship added has duplicate 0021087
2015-02-03 17:35 aaroncalero Assigned To Orekaria => aaroncalero
2015-02-03 17:38 hgbot Checkin
2015-02-03 17:38 hgbot Note Added: 0074042
2015-02-03 17:43 hgbot Checkin
2015-02-03 17:43 hgbot Note Added: 0074044
2015-02-03 17:43 hgbot Status new => resolved
2015-02-03 17:43 hgbot Resolution open => fixed
2015-02-03 17:43 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7df040939eecdaefb786784b64a2a3af9c638c35 [^]
2015-02-06 19:20 hgbot Checkin
2015-02-06 19:20 hgbot Note Added: 0074263
2015-02-26 17:32 dmitry_mezentsev Note Added: 0074979
2015-03-06 15:41 marvintm Review Assigned To => marvintm
2015-03-06 15:41 marvintm Status resolved => closed
2015-03-06 15:41 marvintm Fixed in Version => RR15Q2
2015-03-06 16:55 Orekaria Relationship added blocks 0028933
2015-03-06 16:57 Orekaria Note Added: 0075259
2015-03-06 16:57 Orekaria Note Edited: 0075259 View Revisions


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker