Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support dots and slashes in virtual custom attributes #14329

Merged
merged 5 commits into from
Mar 16, 2017

Commits on Mar 15, 2017

  1. Changed spec for report with custom attributes to add

    special characters in custom attributes
    lpichler committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    9e09e03 View commit details
    Browse the repository at this point in the history
  2. Escape special characters in value2tag

    Field with virtual custom attributes  don’t contains associations so it don’t contain “.” as separator
    
    it has always form:
    
    <Model>-virtual_custom_attribute_<name_of_attribute>
    
    After this  we need to escape it back because there was dynamic method created with unescaped form,
    and such method will be called in evaluation.
    lpichler committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    a8ba690 View commit details
    Browse the repository at this point in the history
  3. Remove ‘/virtual/’ by pattern with gsub

    before:
    ns= ‘/virtual/parent_resource_pool/name’
    predicate = ns.split("/")
    => ["", "virtual", "parent_resource_pool", "name"]
    predicate = ns.split(“/“)[2..-1] # throw away /virtual
    => ["parent_resource_pool", "name"]
    
    after: (same)
    ns= ‘/virtual/parent_resource_pool/name’
    ns.gsub!("/virtual/","")  # throw away /virtual
    => ‘parent_resource_pool/name’
    predicate = ns.split("/")
    => ["parent_resource_pool", "name"]
    lpichler committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    128a403 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    809d5e1 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2017

  1. Change REGEX for covering virtual custom attributes with special char…

    …acters
    
    now there is allowed to have special characters as `-` and `.` `/`
    lpichler committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    faaecaf View commit details
    Browse the repository at this point in the history