Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051931Retail ModulesWeb POSpublic2023-03-21 15:372023-03-24 13:48
jorgewederago 
radhakrishnan 
highmajoralways
closedfixed 
5
 
RR23Q2 
No
0051931: OB.App.View.DialogUIHandler.askConfirmation should accept non translatable messages in Enyo
When using the API OB.App.View.DialogUIHandler.askConfirmation, it is not possible to set neither titles nor body messages that are not translatable messages
1.- Open Enyo POS
2.- Open console and write the following code
OB.App.View.DialogUIHandler.askConfirmation({
    title:'test',
    message: 'test'
})

Check that both title and body contain an UNDEFINED
Parse the incoming title and message to ensure they are translatable labels before applying OB.I18N.getLabel.

In core2 there is some code that is doing the same using the following rule:

if (!key.startsWith('$')) {
  return key;
}

so it would be a nice idea to use it also for this issues
No tags attached.
Issue History
2023-03-21 15:37jorgewederagoNew Issue
2023-03-21 15:37jorgewederagoAssigned To => Retail
2023-03-21 15:37jorgewederagoTriggers an Emergency Pack => No
2023-03-22 08:31radhakrishnanAssigned ToRetail => radhakrishnan
2023-03-22 08:31radhakrishnanStatusnew => scheduled
2023-03-23 16:28jorgewederagoProposed Solution updated
2023-03-24 10:22hgbotNote Added: 0147936
2023-03-24 13:48hgbotResolutionopen => fixed
2023-03-24 13:48hgbotStatusscheduled => closed
2023-03-24 13:48hgbotNote Added: 0147953
2023-03-24 13:48hgbotFixed in Version => RR23Q2
2023-03-24 13:48hgbotNote Added: 0147954

Notes
(0147936)
hgbot   
2023-03-24 10:22   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/490 [^]
(0147953)
hgbot   
2023-03-24 13:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/490 [^]
(0147954)
hgbot   
2023-03-24 13:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: bf8cd3a2f4b34441ea260a3f18bf12a3cdd87114
Author: Radhakrishnan Seeman <radhakrishnan@qualiantech.com>
Date: 22-03-2023 15:00:44
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/bf8cd3a2f4b34441ea260a3f18bf12a3cdd87114 [^]

Fixed ISSUE-51931: AskConfirmation should validate the title and message
* If title and message doesn't have the label then it should print title and message
  without the OB.I18N.getLabel

---
M web/org.openbravo.mobile.core/app/view/DialogUIHandler.js
---