cancel
Showing results for 
Search instead for 
Did you mean: 

Checking out a document - bug?

tarkadu
Champ in-the-making
Champ in-the-making
I have a problem when checking out documents. If user A checks out a document, user B should see this file as "locked by A" and only user A himself should see the symbol and tooltip "locked by you". It seems that sometimes this gets mixed up. User B sees all the documents checked-out by user A as "item locked by you" together with the respective symbol. In a different space it's just the other way round - user A sees user B's checked out content as locked by him.
What's interesting: if the "My Alfresco Dashboard" is configured to show all checked out documents I can see only those items that are really checked out by this user. Navigating through workspaces however, this user sees the wrong symbol and tooltip as described above.

Did anybody else notice this behaviour? I just tried 45 minutes to find any system of this error but couldn't find any.

I'm running 2.0 on a gentoo-machine.

Thanks.
Tarkadu
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
The incorrect tooltip is a bug, it has been fixed in HEAD.

Thanks,

Kevin

tarkadu
Champ in-the-making
Champ in-the-making
Thanks Kevin!

In my case it's not only the tooltip but also the "locked" icon! I've seen the issue on JIRA but couldn't find a resolution. Is there anything simple I could do or do I have to wait for the next release?

Tarkadu

kevinr
Star Contributor
Star Contributor
Yes the fix solves the icon issue also (it's the same problem internally).

It can fixed by modifying the code of UILockIcon yourself but you'll need to download the source (SDK) and patch in the resulting modifying class into your war. If you fancy giving it a go, the changes are simple enough, in UILockIcon.java, replace lines 120-122:

            LockStatus lockStatus = getLockService(context).getLockStatus(ref);
            locked = (lockStatus == LockStatus.LOCKED || lockStatus == LockStatus.LOCK_OWNER);
            lockedOwner = (lockStatus == LockStatus.LOCK_OWNER);
with the following instead:

            String lockerUser = (String)nodeService.getProperty(ref, ContentModel.PROP_LOCK_OWNER);
            if (lockerUser != null)
            {
               locked = true;
               lockedOwner = (lockerUser.equals(Application.getCurrentUser(context).getUserName()));
            }

Hope this helps,

Kevin