[MGNLPN-409] Date trait can be stored without define startDate and endDate values Created: 03/Jan/18 Updated: 16/May/18 Resolved: 15/May/18 |
|
| Status: | Closed |
| Project: | Magnolia Personalization |
| Component/s: | Traits |
| Affects Version/s: | 1.4.7, 1.5.1 |
| Fix Version/s: | 1.4.8, 1.5.3 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Mercedes Iruela | Assignee: | Antonín Juran |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| 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: | Support | ||||
| Sprint: | Kromeriz 147 | ||||
| Story Points: | 3 | ||||
| Description |
|
When audience is choosen audience and it is used 'date' as the trait, you can save the trait without choosing startDate and endDate. When the page is requested and error comes up since the info.magnolia.personalization.date.system.DateVoter is returning a NullpointerException: Caused by: java.lang.NullPointerException at info.magnolia.personalization.date.system.DateVoter.boolVote(DateVoter.java:38) at info.magnolia.personalization.date.system.DateVoter.boolVote(DateVoter.java:28) at info.magnolia.voting.voters.AbstractBoolVoter.vote(AbstractBoolVoter.java:53) at info.magnolia.voting.voters.AndVoting.vote(AndVoting.java:51) at info.magnolia.voting.voters.VoterSet.vote(VoterSet.java:84) at info.magnolia.voting.DefaultVoting.vote(DefaultVoting.java:56) at info.magnolia.voting.voters.VoterSet.vote(VoterSet.java:84) at info.magnolia.personalization.variant.AbstractVariantResolver.vote(AbstractVariantResolver.java:89) at info.magnolia.personalization.variant.RegistryVariantResolver.resolveVariant(RegistryVariantResolver.java:68) at info.magnolia.personalization.variant.AbstractVariantResolver.getVariantNode(AbstractVariantResolver.java:66) at info.magnolia.personalization.variant.EditorVariantResolver.getVariantNode(EditorVariantResolver.java:71) at info.magnolia.personalization.decoration.PersonalizationNodeWrapper.<init>(PersonalizationNodeWrapper.java:91) at info.magnolia.personalization.decoration.ComponentPersonalizationNodeWrapper.<init>(ComponentPersonalizationNodeWrapper.java:37) We shouldn't allow to save this date trait without startDate and endDate values or at least we shouldn´t return an error if these values are not set. |