How to clean-up page history in one click

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to clean-up page history in one click

Roman Muntyanu
Hi,

  We are keeping record of daily team progress in XWiki which is basically a plain document with table listing all active tasks and their changing statuses. Each day we copy notes from previous day by "copy XWiki document" action.
  This has one major drawback: current version of the document is 2500 which means each day we create new document with 2.5K history versions.

  Is there a simple (without scripting) way to delete history?
   a) for single document
   b) for set of documents with common parent

Regards,
 Roman

PS: this is the reason for opening http://jira.xwiki.org/browse/XWIKI-10126 
Reply | Threaded
Open this post in threaded view
|

Re: How to clean-up page history in one click

Marius Dumitru Florea
On Tue, Apr 8, 2014 at 6:21 PM, coldserenity <[hidden email]> wrote:

> Hi,
>
>   We are keeping record of daily team progress in XWiki which is basically a
> plain document with table listing all active tasks and their changing
> statuses. Each day we copy notes from previous day by "copy XWiki document"
> action.
>   This has one major drawback: current version of the document is 2500 which
> means each day we create new document with 2.5K history versions.
>
>   Is there a simple (without scripting) way to delete history?

>    a) for single document

/xwiki/bin/deleteversions/Sandbox/Foo?rev1=1.1&rev2=3.1

In one click on a link :) (you can of course generate the link with a
script that fills in the right version range, which I hard-coded).

Hope this helps,
Marius

>    b) for set of documents with common parent
>
> Regards,
>  Roman
>
> PS: this is the reason for opening http://jira.xwiki.org/browse/XWIKI-10126
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/How-to-clean-up-page-history-in-one-click-tp7590035.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to clean-up page history in one click

Sergiu Dumitriu-3
On 04/08/2014 11:35 AM, Marius Dumitru Florea wrote:

> On Tue, Apr 8, 2014 at 6:21 PM, coldserenity <[hidden email]> wrote:
>> Hi,
>>
>>   We are keeping record of daily team progress in XWiki which is basically a
>> plain document with table listing all active tasks and their changing
>> statuses. Each day we copy notes from previous day by "copy XWiki document"
>> action.
>>   This has one major drawback: current version of the document is 2500 which
>> means each day we create new document with 2.5K history versions.
>>
>>   Is there a simple (without scripting) way to delete history?
>
>>    a) for single document
>
> /xwiki/bin/deleteversions/Sandbox/Foo?rev1=1.1&rev2=3.1
>
> In one click on a link :) (you can of course generate the link with a
> script that fills in the right version range, which I hard-coded).

There's also /xwiki/bin/reset/Sandbox/Foo, but by default it will
require two clicks, one for opening the confirmation page and one for
confirming the action. You can generate a link that also includes the
confirmation:

[[Reset history>>path:$doc.getURL("reset",
"confirm=1&form_token=$!{services.csrf.getToken()}")]]

The problem with both these links is that they they don't reset the
version to 1.1, the document will still have version 2500.1, just that
there won't be any 1.1 to 2499.1 versions in the history.

You can write a Groovy script or a Java component that can clean up the
history on a bunch of documents, including resetting the version to 1.1,
but that's a bit harder and requires working with the internal
XWikiDocument and XWikiDocumentArchive.

> Hope this helps,
> Marius
>
>>    b) for set of documents with common parent
>>
>> Regards,
>>  Roman
>>
>> PS: this is the reason for opening http://jira.xwiki.org/browse/XWIKI-10126
>>


--
Sergiu Dumitriu
http://purl.org/net/sergiu
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users