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 23:53:00 UTC

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

    [ https://issues.apache.org/jira/browse/SLING-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17530975#comment-17530975 ] 

Eric Norman commented on SLING-11293:
-------------------------------------

Prepared PR #26 for review and feedback.

> 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: 10m
>  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)