[MGNLPN-548] Default value in traits of audience is missing Created: 27/May/21  Updated: 16/Oct/23

Status: Open
Project: Magnolia Personalization
Component/s: None
Affects Version/s: 2.0.6, 2.0.7
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jonathan Ayala Assignee: Dominik Maslanka
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLPN-713 Decorated traits don't trigger Open
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: AuthorX Support
Team: AuthorX

 Description   

Steps to reproduce

  1.  Go to pages-app in demoauthor and select variant contact: americas /travel/contact/variants
  2.  Click choose audience action

 

Expected results

In the traits section there is a default value for All as it was in previous versions. This would avoid having an empty value for op when more than one trait is picked up.

Actual results

No default value is selected

Development notes

Since it is a custom field (info.magnolia.personalization.ui.RuleOperandSelector.Definition) that is autogenerated, it is not possible to decorate the dialog to add the defaultValue property.

Tested also in 6.2.9-SNAPSHOT



 Comments   
Comment by Antonín Juran [ 07/Jun/23 ]

DISCOVERY

Choose audience action is configured with openDialogAction with its default setting populate: true which means default field values aren't applied despite they're configured see here

Possible solution

Implement custom open dialog action applying default values in case if a node (mgnl:ruleSet) related to TraitRulesFieldDefinition does not exists, see here.

Generated at Mon Feb 12 06:38:43 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.