node operation: new owner

ray007 - May 26, 2007 - 16:38
Project:Node Adoption
Version:5.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

the attached patch implements a operation for admin/content/node to assign the selected nodes a new owner.
I thought the node_adoption module is a fitting home for this, if I'm wrong just tell me and I'll keep it in my custom site module.

AttachmentSize
node_adoption-user-op-1.patch3.07 KB

#1

DanielTheViking - May 26, 2007 - 19:18

Fits nicely into this module, I think.

Note that there is a similar feature request marked "critical" by another user from last year, here:
http://drupal.org/node/84004

If he is still waiting, is this hard to adjust for 4.7?
Many sites will run on 4.7 for long time to come. This is a very practical feature.

#2

ray007 - May 26, 2007 - 19:36

I don't think it's hard to adjust for 4.7, but I won't do it since I only have 5.x sites.

#3

Christefano - June 23, 2007 - 07:25

I'm +1 for this feature and will test this when I have a chance.

#4

ray007 - June 23, 2007 - 07:52

It probably need another line changing the owner of the last revision in the node_revisions table too. Easy to do.

I'm currently trying to find an interference with another module where changing the owner doesn't give edit-rights to the new owner, but since it's the same problem when changing the owner with the 'author' field in the edit form, it's not a problem of this code.

And another question maybe is if we'd want to create a new revision when we change owner to log the fact of owner change ...

#5

DanielTheViking - June 23, 2007 - 12:46

¤4: agreed. Practical to set a revision that logs the owner change. I think the current settings already provides this opportunity: but it should be possible to protect that revision from being removed by the new owner.

On a different site, I have used the node clone module along with the settings of the book, so that a new owner is allowed to edit the new node when it becomes "his(her) own", but leaving the original node in my name, for example, preventing any changes to that one. Then, when the new node takes over, I used the outline to move the "original" into a "history/log" book whenever that was desireable.

However, not an elegant "solution" as it breaks links etc. since each new one gets a new node id (and title). It also means "unnecessary" (since it is possible to "automate" by providing practical features and configuration options) extra work.

The revision system should ideally provide these effects automatically so that we can concentrate on quality content, not just managing and securing the quality.

Therefore, I wonder if not the node adoption feature should integrate somewhat with a module such as Revision moderation, so that we could do such a owner change from the revisions page.

#6

ray007 - June 23, 2007 - 16:27

new patch using node_safe() instead of direct db-manipulation.
if somebody want to add revision adding and logging, should be easy now.

AttachmentSize
node_adoption-user-op-2.patch 3.37 KB

#7

christefano - October 30, 2008 - 10:32

I just had a need for this today. If only I'd found this issue sooner...

#8

bomarmonk - January 7, 2009 - 04:36

I am using the patch in #6 and it works wonderfully. Please include this in the port to Drupal 6. Thank you ray007!

#9

bomarmonk - January 9, 2009 - 20:42

One issue I ran into: is there any way to keep the node status from becoming "updated" when you assign a new user to the node? My lists of most recent content get distorted by the reassignment... I'll look for a solution (it might be outside the scope of this module).

 
 

Drupal is a registered trademark of Dries Buytaert.