asset-share-commons icon indicating copy to clipboard operation
asset-share-commons copied to clipboard

PropertyValues PredicateEvaluator doesn't support path/values with comma

Open kelvinxzf opened this issue 6 years ago • 4 comments

Describe the bug ASC commons PropertyValues translates the following

6_group.1_propertyvalues.1_values = /content/dam/microsoft/rad/aem6331/bom1,bom2
6_group.1_propertyvalues.property = jcr:content/metadata/msft:associatedBOM

into

6_group.1_property.1_value = /content/dam/mycompany/rad/aem6331/bom1
6_group.1_property.2_value=bom2
6_group.1_property.property = jcr:content/mycompany/myco:associatedBOM

Environment

  • AEM Version: 6.3.3
  • Asset Share Commons Version: 1.6.10
  • Author, Publish or both? Both

Expected behavior PropertyValues should at least escape comma (or other special chars) in values, so the above should be translated to

6_group.1_property.1_value = /content/dam/mycompany/rad/aem6331/bom1,bom2
6_group.1_property.property = jcr:content/metadata/myco:associatedBOM

kelvinxzf avatar Jan 23 '19 00:01 kelvinxzf

So this might be fixable via .. https://github.com/Adobe-Marketing-Cloud/asset-share-commons/pull/351 which lets you set the delimiter (right now "," is the default and hardcoded delimiter)

It might be worth implementing a value separator notion tho ... ie. if there are "..." around the value, then delimiters inside are ignored (sort of like CSV)... that might be a little more idomatic..?

Either way, this should be built on top of https://github.com/Adobe-Marketing-Cloud/asset-share-commons/pull/351 since 351 does some heavy touches to the PropertyValuesPredicate.

davidjgonzalez avatar Jan 24 '19 00:01 davidjgonzalez

@davidjgonzalez i see #357 has been reverted. would this be fixed in #387 instead?

kelvinxzf avatar Jun 05 '19 23:06 kelvinxzf

Not entirely - but the property component can be updated to pass a “delimiter” value to the propertyvalues predicate... so it’s positioned to be fixable, if that makes sense

davidjgonzalez avatar Jun 05 '19 23:06 davidjgonzalez

so that "delimiter" could be something other than a comma...in such case comma can be encoded as in propertyvalue? probably need to make sure the delimiter is one of the restricted chars of folder names. did I understand correctly?

kelvinxzf avatar Jun 05 '19 23:06 kelvinxzf