Bug 1144312
| Summary: | Error "Data provider name required for current locale" with en_GB | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] JBoss BPMS Platform 6 | Reporter: | Toshiya Kobayashi <tkobayas> | ||||
| Component: | BAM | Assignee: | David Gutierrez <dgutierr> | ||||
| Status: | CLOSED EOL | QA Contact: | Gui Jospin <gjospin> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.0.2 | CC: | kverlaen, mbaluch | ||||
| Target Milestone: | ER3 | ||||||
| Target Release: | 6.1.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2020-03-27 20:05:24 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created attachment 939138 [details]
DataProvider_en_GB.png
Probably because LocaleManager.getCurrentLang() doesn't extract 'language'. https://github.com/droolsjbpm/dashboard-builder/blob/6.0.x/modules/dashboard-ui/dashboard-ui-core/src/main/webapp/components/bam/provider/manager/data_provider_edit_create.jsp#L130 https://github.com/droolsjbpm/dashboard-builder/blob/6.0.x/modules/dashboard-commons/src/main/java/org/jboss/dashboard/LocaleManager.java#L229-L231 In additon, probably the jsp should loop all languages, not all locales? https://github.com/droolsjbpm/dashboard-builder/blob/6.0.x/modules/dashboard-ui/dashboard-ui-core/src/main/webapp/components/bam/provider/manager/data_provider_edit_create.jsp#L123-L125 If we set provider name per language (not per locale), DataProviderHandler.checkConfig() should be fixed. https://github.com/droolsjbpm/dashboard-builder/blob/6.0.x/modules/dashboard-ui/dashboard-ui-core/src/main/java/org/jboss/dashboard/ui/components/DataProviderHandler.java#L484-L492 Fixed. Language sensitive data, like data provider names, page names, etc. is language specific. So now, the application only asks the user to enter data in the provided languages (not the locales). So in "data-entry" mode only the set of different languages are part of the language selector. On the other side, in "data-visualization" mode, the locale that matches the user's preferred locale (which is read from the information the browser sends to the server) is taken as the current one (https://github.com/droolsjbpm/dashboard-builder/blob/master/builder/src/main/wildfly8/README.md#languages-supported). So imagine two users accessing from different countries (en_GB and en_US) and those two locales are installed (installedLocaleIds=en_GB,en_US,...) The data visualization locale will be the first one that matches the user's preferred locale. In case you want all your "English" users to visualize data in en_GB then just replace the "en" locale by "en_GB". No need for having two English locales in this case. Github commit (master): https://github.com/droolsjbpm/dashboard-builder/commit/b1186dd764c547ac586ad6b80bb1653eb14c2b49 Github commit (6.2.x): https://github.com/droolsjbpm/dashboard-builder/commit/284fe170bf38ec924e5de81fbe91fa74a194aaf5 Ok, verified with BPM Suite 6.1.0 ER3 |
Description of problem: I set en_GB as locale for dashbuilder (because I want DD/MM/YYYY format), ==== <system-properties> .... <property name="org.jboss.dashboard.LocaleManager.installedLocaleIds" value="en_GB,en,es,de,fr,pt,ja,zh"/> <property name="org.jboss.dashboard.LocaleManager.defaultLocaleId" value="en"/> </system-properties> ==== Then viewing data is fine. But I see an Error "Data provider name required for current locale" when editing Data Provider (See DataProvider_en_GB.png). The data provider is saved anyway, but this error is always shown. Steps to Reproduce: 1. Edit standalone.xml to add these system properties. <system-properties> .... <property name="org.jboss.dashboard.LocaleManager.installedLocaleIds" value="en_GB,en,es,de,fr,pt,ja,zh"/> <property name="org.jboss.dashboard.LocaleManager.defaultLocaleId" value="en"/> </system-properties> 2. Go to dashbuilder Administration -> Data providers 3. Click "Edit" icon for "jBPM Count Processes" 4. Edit "Query:" and save. Actual results: 'Name:' input field doesn't appear for "English (United Kingdom)" Error message Data provider name required for current locale (English (United Kingdom)) Expected results: 'Name:' input field appears for "English (United Kingdom)" so users can input the Name. No error when saving.