underbad wrote:
Hey XWiki Users :)
I seem to be having a little trouble in 1.7.1 changing the creator. In my
wiki, I have a tool that makes copies of several "base" documents so that a
user can start off with a template of what they want, most often the main
change is to add some text, or even just to have the relevant document
attached to a specific project.
Problem is, the code that worked for this in 1.4 doesn't work in 1.7.1 - is
there a new way to do this?
Currently I use a groovy script that copies the documents related to the
tool (this works fab); but then I have a script that goes:
copiedDoc.doc.setCreator(context.user);
context.user seems to be coming up correctly.
copiedDoc is correctly assigned to the document.
But the creator doesn't get changed.
There was no API change, so this should still work. Can you check that
copiedDoc.doc does return a valid reference? Can you check that the call
indeed doesn't succeed by calling copiedDoc.getCreator() right after the
set line?
--
Sergiu Dumitriu
http://purl.org/net/sergiu/