- Issue created by @jacobupal
- Merge request !30Make the current user (who initialized the replacement) the author of all resulting revisions. β (Closed) created by jacobupal
- π©πͺGermany Anybody Porta Westfalica
In my opinion this should be a setting, because you may alternatively want to keep the existing behaviour, if an administrator runs the scans and replacements and should not appear as author.
- π¬π§United Kingdom jacobupal Leeds
I think you might have misunderstood (forgive me if not!). This proposal would not make the person running the replacements the author of the piece itself (the "uid") instead I'm proposing that the "revision_uid" value (not "uid") in the new revision should reflect who ran the replacement.
In your example, the author of piece would remain whatever it was before the replacement, but when reading through the revision history, the change would be now attributed to the administrator who ran the replacement, this would only be visible by users who can read the revision history. Or if for example you have made the revision user visible in your theme using some view/twig like "Created on [created] by [uid] and last updated on [changed] by [revision_uid]".
With the current behavior: if I make a normal change to an article, and a new revision is made, that change/revision is always attributed to me by default. But then, if somebody runs a bunch of replacements after me, using this module, those changes are now attributed to me too, even though I have nothing to do with them. Those new revisions are not my work, and if somebody asks me why I made those changes I won't have anything to tell them.
I can't really think of a situation where this proposal shouldn't be the default, because that is who made this change. Attributing changes/revisions to people who didn't make those changes seems like a bug to me...
I can see a situation where you might like the option want to force "revision_uid" to be some generic user and call it "bulk changes" or something, however I think that'd be a different proposal/issue.
- π¬π§United Kingdom jacobupal Leeds
Just to illustrate, I performed the same 3 steps and have screenshot what happens before and after this proposed change.
The steps:
- User "jacob" creates the new article.
- User "clare" makes a change to the article.
- User "admin" performs a replacement which affects the article.
This first image compares two screenshots; before and after. It can be seen that there is no change to the "author" from this proposal.
However, when viewing revision history there is a difference.
Before the patch/MR, we can see the latest is revision is incorrectly attributed to "clare":
After the patch/MR we can see the latest revision is properly attributed to "admin":
- Status changed to Needs work
4 months ago 10:45pm 21 December 2024 - πΊπΈUnited States smustgrave
Please update for 2.0.x
And probably need test case.
- First commit to issue fork.
- Merge request !37Issue #3481819 by jacobupal: Revision author should default to the current user β (Merged) created by dlevchik
- π΅π±Poland dlevchik Poznan, Poland
Created new MR for 2.x
updated code to use methods instead of properties, because properties name may differ and setRevisionUserId uses getRevisionMetadataKey
for paragraphs update only parent entity revisions if can, because paragraphs can't have revision author
added assertion in test case - Status changed to Needs review
15 days ago 9:15pm 21 March 2025 -
smustgrave β
committed a8f6e370 on 2.0.x authored by
dlevchik β
Issue #3481819 by jacobupal: Revision author should default to the...
-
smustgrave β
committed a8f6e370 on 2.0.x authored by
dlevchik β
Automatically closed - issue fixed for 2 weeks with no activity.