[MGNLPN-570] Changing $type of a trait breaks trait resolution due to the old class being present in the voter stored in JCR Created: 24/Aug/21  Updated: 07/Sep/21  Resolved: 01/Sep/21

Status: Closed
Project: Magnolia Personalization
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Bug Priority: Neutral
Reporter: Jaroslav Simak Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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
Epic Link: Headless p13n
Sprint: HL & LD 36
Story Points: 2

 Description   

Steps to reproduce

  1.  Define trait in YAML with $type property
  2.  Create a page or component variant
  3.  Choose audience for the variant, pick newly created trait
  4.  Preview content to see that it displays right variant
  5.  Change $type of the trait to something else
  6.  Preview content -> variant didn't match

Expected results

Variant is displayed

Actual results

Original is displayed

Workaround

Modify traitClass property in the VoterSet under the variant


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