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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034431
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2016-11-08 17:042016-11-22 18:48
ReporterguillermogilView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in VersionRR17Q1
StatusclosedFix in branchFixed in SCM revision6f8a89f152b1
ProjectionnoneETAnoneTarget Version
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

0034431: If a module add some properties with QueryTerminalProperty if it does not return anything you cannot login on WebPOS

DescriptionIf a module add some properties with QueryTerminalProperty if it does not return anything you cannot login on WebPOS.
If it returns some value it works perfectly.
Steps To ReproduceCreate a module with the following code:

import java.util.Arrays;
import java.util.List;

import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.openbravo.retail.posterminal.term.QueryTerminalProperty;

public class NewTerminalProperties extends QueryTerminalProperty {

  @Override
  protected boolean isAdminMode() {
    return true;
  }

  @Override
  protected List<String> getQuery(JSONObject jsonsent) throws JSONException {
    return Arrays.asList(new String[] { "QUERY" });
  }

  @Override
  public String getProperty() {
    return "decriConfiguration";
  }

  @Override
  public boolean returnList() {
    return true;
  }
}


Add the query desired that will not return anything.
Login on WebPOS
Proposed SolutionOn Terminal.java

        if (queryterminal.returnList()) {
          queryaux.put(queryterminal.getProperty(), new JSONArray(new JSONTokener(new JSONObject(
              "{" + queryWriter.toString() + "}").get("data").toString())).get(0));
        } else {
          queryaux.put(queryterminal.getProperty(), new JSONArray(new JSONTokener(new JSONObject(
              "{" + queryWriter.toString() + "}").get("data").toString())));
        }

On the case it is returnList = true it should review if there are some values. If not, return null.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0091302)
hgbot (developer)
2016-11-10 05:40

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1ff9ed660a1049be828b3f9b966d4d7e7a5a6358
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Nov 10 10:10:00 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ff9ed660a1049be828b3f9b966d4d7e7a5a6358 [^]

Fixes issue 34431 : Updated QueryTerminal Property validation

* Return terminal property as null, if no data is returned in the query

---
M src/org/openbravo/retail/posterminal/term/Terminal.java
---
(0091526)
marvintm (manager)
2016-11-15 09:16

There is currently a problem with the solution of this issue. The idea behind the fix is correct, but the code is no longer checking the queryterminal.returnList() value. It should check it and in the case of it returning false, it should return an empty array instead of a null object.
(0091557)
hgbot (developer)
2016-11-15 13:49

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6f8a89f152b1ac1abbb090befc1e21d2a9df5db1
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Nov 15 16:22:57 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6f8a89f152b1ac1abbb090befc1e21d2a9df5db1 [^]

Fixes issue 34431 : Updated QueryTerminal Property validation

* Return data if the returnList is false
* Return null if the returnList is true and data length is 0

---
M src/org/openbravo/retail/posterminal/term/Terminal.java
---

- Issue History
Date Modified Username Field Change
2016-11-08 17:04 guillermogil New Issue
2016-11-08 17:04 guillermogil Assigned To => Retail
2016-11-08 17:04 guillermogil Resolution time => 1480374000
2016-11-08 17:04 guillermogil Triggers an Emergency Pack => No
2016-11-09 05:59 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2016-11-09 05:59 ranjith_qualiantech_com Status new => scheduled
2016-11-10 05:40 hgbot Checkin
2016-11-10 05:40 hgbot Note Added: 0091302
2016-11-10 05:40 hgbot Status scheduled => resolved
2016-11-10 05:40 hgbot Resolution open => fixed
2016-11-10 05:40 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ff9ed660a1049be828b3f9b966d4d7e7a5a6358 [^]
2016-11-11 17:02 guilleaer Review Assigned To => guilleaer
2016-11-11 17:02 guilleaer Status resolved => closed
2016-11-11 17:02 guilleaer Fixed in Version => RR17Q1
2016-11-15 09:16 marvintm Note Added: 0091526
2016-11-15 09:16 marvintm Status closed => new
2016-11-15 09:16 marvintm Resolution fixed => open
2016-11-15 09:16 marvintm Fixed in Version RR17Q1 =>
2016-11-15 10:35 ranjith_qualiantech_com Status new => scheduled
2016-11-15 13:49 hgbot Checkin
2016-11-15 13:49 hgbot Note Added: 0091557
2016-11-15 13:49 hgbot Status scheduled => resolved
2016-11-15 13:49 hgbot Resolution open => fixed
2016-11-15 13:49 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ff9ed660a1049be828b3f9b966d4d7e7a5a6358 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6f8a89f152b1ac1abbb090befc1e21d2a9df5db1 [^]
2016-11-22 18:48 marvintm Review Assigned To guilleaer => marvintm
2016-11-22 18:48 marvintm Status resolved => closed
2016-11-22 18:48 marvintm Fixed in Version => RR17Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker