Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-6096

Checkout/Checkin leaves Lockable aspect on which disables autoVersionOnUpdateProps

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1.2
    • Component/s: Repository
    • Labels:
      None
    • Bug Priority:
      Category 2

      Description

      After checkout/checkin there is a stale Lockable aspect on the original node, which stops autoVersionOnUpdateProps handler from creating new versions on property changes.

      Steps to reproduce:

      1. Create a versionable document
      2. Modify properties
      3. Edit offline
      4. Upload a new version
      5. Modify properties again

      The last step should increment a version of a document, but it doesn't.

      I'm using Alfresco Share to reproduce this issue.

      I can actually point you to the problem in the code which causes above behaviour (line numbers are for Community 4.0.d):
      1. CheckOutCheckInServiceImpl.doCheckout() first adds a Lockable aspect to original node (line 398), then copies the node (line 427) to create a working copy. Lockable aspect gets copied as well.
      2. CheckOutCheckInServiceImpl.checkin() unlocks original node (line 540), but then it copies working copy back to the original (line 570), which restores Lockable aspect on the original. Lockable properties are not copied though, so they are null.
      3. VersionableAspect.onUpdateProperties() policy checks if updated node has a Lockable aspect (line 434) and skips execution if true. This way new version is not created on properties update.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                lightoze Vladimir Kulev
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days, 4 hours
                  4d 4h