You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Fabián Mandelbaum <fm...@gmail.com> on 2011/04/21 22:46:49 UTC

Jackrabbit bug or intended behaviour?

Hello,

I'm using Jackrabbit 2.2.5 and am experiencing the following issue:

User U1 stores a file (nt:file) creating a new revision (1.0)

The revision history node corresponding to revision 1.0 has the
jcr:lastModifiedBy propery correctly set to user U1, so far, so good

User U2 stores the same file, creating a new revision (1.1)

This time the revision history node corresponding to revision 1.1 has
the jcr:lastModifiedBy property set to user U1, instead of the
expected U2 (it's a different user the one creating the new revision).

The jcr:lastModifiedBy property of all subsequent (1.2, 1.3, 1.4, ...)
revisions are always set to U1 (the creator of the 1st revision), no
matter which user stores the file.

I expect each revision to have jcr:lastModifiedBy set to the user
owning the R/W session when storing the file, not to the creator of
the 1st revision.

Are my expectations wrong? Bug or feature? (If it's a feature, what
should I do before/after creating the revision to have
jcr:lastModifiedBy properly set on each revision?)

If you need more details, please let me know. Thanks in advance.

-- 
Fabián Mandelbaum
IS Engineer

Re: Jackrabbit bug or intended behaviour?

Posted by Fabián Mandelbaum <fm...@gmail.com>.
On Tue, Apr 26, 2011 at 10:03 AM, Jukka Zitting <jz...@adobe.com> wrote:
> Hi,
>
> On 21.04.2011 22:46, Fabián Mandelbaum wrote:
>> I expect each revision to have jcr:lastModifiedBy set to the user
>> owning the R/W session when storing the file, not to the creator of
>> the 1st revision.
>>
>> Are my expectations wrong? Bug or feature? (If it's a feature, what
>> should I do before/after creating the revision to have
>> jcr:lastModifiedBy properly set on each revision?)
>
> It's a feature. The jcr:lastModifiedBy property is not automatically
> updated by the repository, so you'll need to explicitly set it to a new
> value when you want it to change.
>
> --
> Jukka Zitting
>

Well indeed it solved the issue. I've just set the jcr:content node's
jcr:lastModifiedBy property and now the revision author is properly
marked on checkin. Thanks Jukka!

-- 
Fabián Mandelbaum
IS Engineer

Re: Jackrabbit bug or intended behaviour?

Posted by Jukka Zitting <jz...@adobe.com>.
Hi,

On 21.04.2011 22:46, Fabián Mandelbaum wrote:
> I expect each revision to have jcr:lastModifiedBy set to the user
> owning the R/W session when storing the file, not to the creator of
> the 1st revision.
> 
> Are my expectations wrong? Bug or feature? (If it's a feature, what
> should I do before/after creating the revision to have
> jcr:lastModifiedBy properly set on each revision?)

It's a feature. The jcr:lastModifiedBy property is not automatically
updated by the repository, so you'll need to explicitly set it to a new
value when you want it to change.

-- 
Jukka Zitting