[MGNLUI-7066] JcrSearchSuppliersGenerator does not set definition name resulting in invalid messagebundle keys. Created: 17/Mar/22  Updated: 20/Dec/22  Resolved: 09/Dec/22

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.16
Fix Version/s: 6.3.0, 6.2.27

Type: Bug Priority: Minor
Reporter: Rico Jansen Assignee: Adam Siska
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File Screenshot 2022-03-18 085804.png     PNG File Screenshot 2022-03-18 at 08-55-39 Admincentral.png    
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLUI-7675 Implementation Sub-task Completed Adam Siska  
MGNLUI-7676 Code review Sub-task Closed Roman Kovařík  
MGNLUI-7677 Preint QA Sub-task Completed Sang Ngo Huu  
MGNLUI-7678 QA Sub-task Closed Jaromir Sarf  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Nucleus Quality Maintenance
Sprint: Nucleus 25
Story Points: 1
Team: Nucleus
Work Started:

 Description   

The JcrSearchSuppliersGenerator generates a SearchSupplierDefinition for jcr apps without a configured one. However it does not set the definition name causing the message bundle key for the app name to be 'search.result.supplier..label' instead of 'search.result.supplier.appname.label' resulting in a fallback to the appname itself.

Location in the code where the definition is generated: info.magnolia.ui.framework.JcrSearchSuppliersGenerator.AutogeneratedDefinitionProvider#AutogeneratedDefinitionProvider

Location where the bundle key is generated: info.magnolia.periscope.search.SearchResultSupplierDefinitionKeyGenerator

Reproduction steps:
 0) on demo.magnolia-cms.com
 1) provide a translation for i18n key search.result.supplier.site.label
 2) search sportstation in find bar

Expected result:
 translation for key should appear in left column for results from Site app

Actual result:
 Site (as an appName fallback) appears in left column

 



 Comments   
Comment by Jaromir Sarf [ 24/Nov/22 ]

Discovery:

Add

supplierDefinition.setName(name); 

to info.magnolia.ui.framework.JcrSearchSuppliersGenerator.AutogeneratedDefinitionProvider constructor and pass definition name to this class.

 

Comment by Adam Siska [ 25/Nov/22 ]

Discovery continues:
Solution in previous comment is acceptable. We should set supplierDefinition#setName similarly as supplierDefinition#setAppName here: info.magnolia.ui.framework.JcrSearchSuppliersGenerator.AutogeneratedDefinitionProvider#AutogeneratedDefinitionProvider

Generated at Mon Feb 12 09:42:49 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.