[
https://issues.apache.org/jira/browse/SLING-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Norman resolved SLING-11293.
---------------------------------
Resolution: Fixed
Merged PR #26 at:
[{{d5a8079}}|https://github.com/apache/sling-org-apache-sling-jcr-repoinit/commit/d5a8079144d6e632a84e4b6c104292173a4341d4]
> allow set default properties instruction to change autocreated property values
> ------------------------------------------------------------------------------
>
> Key: SLING-11293
> URL: https://issues.apache.org/jira/browse/SLING-11293
> Project: Sling
> Issue Type: Improvement
> Reporter: Eric Norman
> Assignee: Eric Norman
> Priority: Major
> Fix For: Repoinit JCR 1.1.40
>
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> Consider a property that already has some autocreated default value. If a
> repoinit script wants to change that property to some new "repoinit" defined
> default value, the "set properties" instruction does not do anything because
> the property already has an autocreated value.
> For example, if "sling:nodeType1" defines an autocreated "threeValues"
> property, then the statement below doesn't do anything because the property
> already has a value.
> {code:java}
> # Set properties
> create path /pathA(sling:nodeType1)
> set properties on /pathA
> default threeValues to test1, test2, test3
> end {code}
>
> Expected:
> The "needToSetProperty" logic for a "default" property should attempt to
> locate the property definition. If a property definition is found and the
> property is defined as "autocreated", then inspect the default values of the
> property definition to see if the current property value is still the same as
> the autocreated default values. If that is the case, then the
> "needToSetProperty" should return true to allow the repoinit to set the new
> default value.
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)