Opened 13 years ago

Closed 6 years ago

#72 closed enhancement (duplicate)

Node renaming tool

Reported by: Earle Martin Owned by: kake
Priority: high Milestone:
Component: openguides Version:
Severity: normal Keywords: utilities, database, admin migrated
Cc:

Description

There should be a tool for admins to rename nodes. As I see it the steps of doing so are:

  1. Pick node, new node name.
  2. Get error if new name exists. Otherwise, confirm rename yes/no.
  3. All node data, metadata gets copied with new name.
  4. For each node in the metadata shown as linking to the old node, copy the content, replace the old name with new in the content and save it.
  5. Replace occurrences of old name with new in link metadata just mentioned.
  6. Delete all node data for old node.
  7. Display confirmation.

Change History (8)

comment:1 Changed 13 years ago by Earle Martin

I forgot to mention "update indices", which should go between items 6 & 7 on the list above.

comment:2 Changed 13 years ago by Ivor Williams

What about the node's version history?

One option would be to leave this against the old node.

An alternative is that renaming drags across the history as well.

We could possibly get the best of both worlds by copying the history to the new node and leaving it in the old one as well.

Thoughts please.

comment:3 Changed 13 years ago by Dominic Hargreaves

This can be done more efficiently by the CGI::Wiki changes yet to be released.

comment:4 Changed 12 years ago by Dominic Hargreaves

There's a command-line node renaming tool in Wiki::Toolkit (wiki-toolkit-rename-node) which uses rename_node in Wiki::Toolkit. Might be nice to use that in Openguides.

comment:5 Changed 12 years ago by Earle Martin

The node renaming tool does indeed work very well. I'd like to extend my original description above with "creates a new node with the old name that redirects to the new one", so this ticket now relies on #164 being done first.

comment:6 Changed 12 years ago by Dominic Hargreaves

Owner: changed from Dominic Hargreaves to Nobody

comment:7 Changed 7 years ago by bob

Owner: changed from Nobody to kake
Priority: normalhigh

i think we have a better version of this for rgl. this should be brought in.

comment:8 Changed 6 years ago by bob

Keywords: migrated added
Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.