[ 
https://issues.apache.org/jira/browse/SLING-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Norman updated SLING-11293:
--------------------------------
    Description: 
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.

 

  was:
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.

 


> 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
>
>
> 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)

Reply via email to