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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041043
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2019-06-06 16:532019-06-25 13:06
ReporterguillermogilView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityurgentResolutionfixedFixed in VersionRR19Q3
StatusclosedFix in branchFixed in SCM revision03a80a7ff428
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toguilleaer
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041043: Retry number is not updated

DescriptionRetry number is not updated if there is a preference defined and then removed unless you clear the cache or you define it to 0.
Steps To Reproduce- Login on livebuilds (without retries preference created)
- Execute the following on the console: OB.UTIL.localStorage.getItem('maxNumOfRequestRetries')
- Value will be 0
- Execute the following on the console: OB.UTIL.localStorage.setItem('maxNumOfRequestRetries', 2)
- Refresh the POS
- Execute the following on the console: OB.UTIL.localStorage.getItem('maxNumOfRequestRetries')
- Value will be 2
- Create the preference with value 0 on the backoffice
- Reload the POS
- Execute the following on the console: OB.UTIL.localStorage.getItem('maxNumOfRequestRetries')
- Value will be 0
Proposed SolutionThis code should be updated:

      function getPreference(preference, minValue, defaultValue) {
        try {
          var val = OB.MobileApp.model.get('permissions')[preference];
          if (!val || !_.isNumber(parseInt(val, 10)) || parseInt(val, 10) < minValue) {
            return defaultValue;
          }
          return parseInt(val, 10);
        } catch (e) {
          return defaultValue;
        }
      }

!val condition is not working as expected. If there is no preference it should put 0
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0112589)
hgbot (developer)
2019-06-12 08:28

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 03a80a7ff428c6f8b1a56ee62027c80347c05d88
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Jun 12 11:58:31 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/03a80a7ff428c6f8b1a56ee62027c80347c05d88 [^]

Fixed issue 41043 : Request Preference should use defaultValue instead of localStorage value when creating it

* If Preference is enabled, Preference value will be updated to localStorage.
  If Preference is removed, then defaultValue should be updated to localStorage instead of updating localStorage again to localStorage

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---

- Issue History
Date Modified Username Field Change
2019-06-06 16:53 guillermogil New Issue
2019-06-06 16:53 guillermogil Assigned To => Retail
2019-06-06 16:53 guillermogil Resolution time => 1561154400
2019-06-06 16:53 guillermogil Triggers an Emergency Pack => No
2019-06-11 14:22 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2019-06-11 14:22 ranjith_qualiantech_com Status new => scheduled
2019-06-12 08:28 hgbot Checkin
2019-06-12 08:28 hgbot Note Added: 0112589
2019-06-12 08:28 hgbot Status scheduled => resolved
2019-06-12 08:28 hgbot Resolution open => fixed
2019-06-12 08:28 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/03a80a7ff428c6f8b1a56ee62027c80347c05d88 [^]
2019-06-25 13:06 guilleaer Review Assigned To => guilleaer
2019-06-25 13:06 guilleaer Status resolved => closed
2019-06-25 13:06 guilleaer Fixed in Version => RR19Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker