Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-21806

removeAspect deletes properties inherited from base aspect even if base aspect is still applied

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Unprioritized
    • Resolution: Won't Fix
    • Affects Version/s: Community Edition 201605 GA
    • Fix Version/s: None
    • Security Level: external (External user)
    • Labels:
      None

      Description

      Given the following constellation:

      • base aspect A defines property X
      • aspect B defined to have aspect A as parent
      • aspect A and B are applied to a node
      • property X is set with a value
      • aspect B is removed from the node (aspect A remains applied)

      The NodeService operation removeAspect will remove all the properties of aspect B including those inherited from the aspect A, even though aspect A is still applied. This may cause integrity errors as such property may be mandatory and enforced.

      Steps to reproduce
      1. Create custom model M1 via model manager
      2. Create aspect A in model M1
      3. Define property X (d:text) in aspect A
      4. Define form for aspect A
      5. Activate model M1
      6. Create custom model M2 via model manager
      7. Create aspect B in model M2 with parent aspect A
      8. Activate model M2
      9. Apply aspects A and B to a document in the Repository
      10. Set value of property X via Edit Metadata
      11. Remove aspect B
      12. Check metadata

      Expected result: property X (defined by aspect A) is still present with the previous value
      Observed result: property X is displayed as having no value

      Note: The steps to reproduce involve two separate models due to a limitation in the model manager (ALF-21807).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                afaust Axel Faust
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: