Ticket #13686 (new Bug)

Opened 3 years ago

"Paste" transaction note should provide additional info

Reported by: frapell Owned by:
Priority: minor Milestone: 4.x
Component: Unknown Version: 4.3
Keywords: Cc:

Description

Right now when pasting an object somewhere, there's a transaction note that will say something like:

'Pasted content to [some url]'

However, CopySupport knows if it was a copy operation (code 0) or a move operation (code 1), and it would be great to have the transaction note to include this info...

There are 2 cpy's which will paste objects that were cut/copy:

  • Products/CMFPlone/skins/plone_scripts/folder_paste.cpy
  • Products/CMFPlone/skins/plone_scripts/object_paste.cpy

For that reason, one cannot import OFS.CopySupport._cb_decode since it starts with an underscore. Also, its behavior connot be replicated because zlib and marshall cannot be imported from a cpy...

I'm not sure how to implement this... one way would be adding an additional method to CopyContainer from CopySupport that returns the operation code. And then from those cpy, call this method and add the proper text to the transaction note.

Another way of doing it would be to remove the transaction note from the cpy's, and do it from within manage_pasteObjects itself.

What do you think?

Note: See TracTickets for help on using tickets.