You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Eric Norman (Jira)" <ji...@apache.org> on 2022/05/02 19:27:00 UTC

[jira] [Created] (SLING-11293) allow set default properties instruction to change autocreated property values

Eric Norman created SLING-11293:
-----------------------------------

             Summary: 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
             Fix For: Repoinit JCR 1.1.40


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
set properties on /pathA(sling:nodeType1)
  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)