[Package plugin] Export documents with withVersions=false

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

[Package plugin] Export documents with withVersions=false

Thomas Mortagne
Administrator
Hi all,

The packager internal plugin take care if import/export of XAR. It
also can be configured and one of theses options is "withVersion". In
export mode this options just indicate that the document history is
included in export or not. In fact this option is really used in
XWikiDocument.toXMLDocument(boolean, boolean, boolean, boolean,
XWikiContext).

What I dont understand is why this option did not also reset or delete
all version related document's parameters : "version" and "creator",
"author", "contentAuthor", "creationDate", "date", "contentUpdateDate"
 (and maybe more I forget) that are also related to version for me.

I would like to add a "if withVersion=true" for all theses values. WDYT ?

Regards,

--
Thomas Mortagne
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [Package plugin] Export documents with withVersions=false

Jean-Vincent Drean
Would be +1 to reset or delete those fields.

JV.

2007/10/10, Thomas Mortagne <[hidden email]>:

> Hi all,
>
> The packager internal plugin take care if import/export of XAR. It
> also can be configured and one of theses options is "withVersion". In
> export mode this options just indicate that the document history is
> included in export or not. In fact this option is really used in
> XWikiDocument.toXMLDocument(boolean, boolean, boolean, boolean,
> XWikiContext).
>
> What I dont understand is why this option did not also reset or delete
> all version related document's parameters : "version" and "creator",
> "author", "contentAuthor", "creationDate", "date", "contentUpdateDate"
>  (and maybe more I forget) that are also related to version for me.
>
> I would like to add a "if withVersion=true" for all theses values. WDYT ?
>
> Regards,
>
> --
> Thomas Mortagne
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [Package plugin] Export documents with withVersions=false

Jerome Velociter
In reply to this post by Thomas Mortagne
Hi Thomas,

I agree, all those parameters should be reset if you specify you don't
want history. In a way, you want a new document as if it never existed
before, so dates shoulds be the import date, and so on.

This is somehow the same as the copyDocument issue here :
http://jira.xwiki.org/jira/browse/XWIKI-1759 (when copying a document with
the resetCreationData set to true, the contentUpdateDate field is left as
it was on the old doc)

Jérôme.

> Hi all,
>
> The packager internal plugin take care if import/export of XAR. It
> also can be configured and one of theses options is "withVersion". In
> export mode this options just indicate that the document history is
> included in export or not. In fact this option is really used in
> XWikiDocument.toXMLDocument(boolean, boolean, boolean, boolean,
> XWikiContext).
>
> What I dont understand is why this option did not also reset or delete
> all version related document's parameters : "version" and "creator",
> "author", "contentAuthor", "creationDate", "date", "contentUpdateDate"
>  (and maybe more I forget) that are also related to version for me.
>
> I would like to add a "if withVersion=true" for all theses values. WDYT ?
>
> Regards,
>
> --
> Thomas Mortagne
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>


_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [Package plugin] Export documents with withVersions=false

vmassol
Administrator
In reply to this post by Thomas Mortagne
+1

-Vincent

On Oct 10, 2007, at 8:02 AM, Thomas Mortagne wrote:

> Hi all,
>
> The packager internal plugin take care if import/export of XAR. It
> also can be configured and one of theses options is "withVersion". In
> export mode this options just indicate that the document history is
> included in export or not. In fact this option is really used in
> XWikiDocument.toXMLDocument(boolean, boolean, boolean, boolean,
> XWikiContext).
>
> What I dont understand is why this option did not also reset or delete
> all version related document's parameters : "version" and "creator",
> "author", "contentAuthor", "creationDate", "date", "contentUpdateDate"
>  (and maybe more I forget) that are also related to version for me.
>
> I would like to add a "if withVersion=true" for all theses values.  
> WDYT ?
>
> Regards,
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [Package plugin] Export documents with withVersions=false

Thomas Mortagne
Administrator
Great I will make this modification tomorrow in XWikiDocument.toXMLDocument

Jerome you already made a patch to make this in copy document it
seems. You apply this yourself or prefer I take the two ?

2007/10/11, Vincent Massol <[hidden email]>:

> +1
>
> -Vincent
>
> On Oct 10, 2007, at 8:02 AM, Thomas Mortagne wrote:
>
> > Hi all,
> >
> > The packager internal plugin take care if import/export of XAR. It
> > also can be configured and one of theses options is "withVersion". In
> > export mode this options just indicate that the document history is
> > included in export or not. In fact this option is really used in
> > XWikiDocument.toXMLDocument(boolean, boolean, boolean, boolean,
> > XWikiContext).
> >
> > What I dont understand is why this option did not also reset or delete
> > all version related document's parameters : "version" and "creator",
> > "author", "contentAuthor", "creationDate", "date", "contentUpdateDate"
> >  (and maybe more I forget) that are also related to version for me.
> >
> > I would like to add a "if withVersion=true" for all theses values.
> > WDYT ?
> >
> > Regards,
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>


--
Thomas Mortagne
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [Package plugin] Export documents with withVersions=false

ebullient
WAIT WAIT WAIT...

We already went through this. When I export a document (say an
application), I want to be able to export it without the version
history, but with other attributes preserved!!

I don't think this is a good idea.. -1, -1!!!

Perhaps it could be combined with the preserveVersion flag?

If withVersions is false and preserveVersion is false then clear those fields,
if withVersions is false, and preserveVersion is true then leave the
fields alone,
if withVersions is true, leave the fields alone



On 10/11/07, Thomas Mortagne <[hidden email]> wrote:

> Great I will make this modification tomorrow in XWikiDocument.toXMLDocument
>
> Jerome you already made a patch to make this in copy document it
> seems. You apply this yourself or prefer I take the two ?
>
> 2007/10/11, Vincent Massol <[hidden email]>:
> > +1
> >
> > -Vincent
> >
> > On Oct 10, 2007, at 8:02 AM, Thomas Mortagne wrote:
> >
> > > Hi all,
> > >
> > > The packager internal plugin take care if import/export of XAR. It
> > > also can be configured and one of theses options is "withVersion". In
> > > export mode this options just indicate that the document history is
> > > included in export or not. In fact this option is really used in
> > > XWikiDocument.toXMLDocument(boolean, boolean, boolean, boolean,
> > > XWikiContext).
> > >
> > > What I dont understand is why this option did not also reset or delete
> > > all version related document's parameters : "version" and "creator",
> > > "author", "contentAuthor", "creationDate", "date", "contentUpdateDate"
> > >  (and maybe more I forget) that are also related to version for me.
> > >
> > > I would like to add a "if withVersion=true" for all theses values.
> > > WDYT ?
> > >
> > > Regards,
> > _______________________________________________
> > devs mailing list
> > [hidden email]
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
>
>
> --
> Thomas Mortagne
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>


--
'Waste of a good apple' -Samwise Gamgee
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [Package plugin] Export documents with withVersions=false

Jean-Vincent Drean
2007/10/12, Erin Schnabel <[hidden email]>:
> WAIT WAIT WAIT...
>
> We already went through this. When I export a document (say an
> application), I want to be able to export it without the version
> history, but with other attributes preserved!!

I'd be curious to know in which use case, could you explain it ?

> Perhaps it could be combined with the preserveVersion flag?
>
> If withVersions is false and preserveVersion is false then clear those fields,
> if withVersions is false, and preserveVersion is true then leave the
> fields alone,
> if withVersions is true, leave the fields alone

If this is going to be implemented I'd be +1 to rename preserveVersion
to preserveAttributes or withAttributes since the current names are
confusing.

JV.
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [Package plugin] Export documents with withVersions=false

Thomas Mortagne
Administrator
Well... maybe in place of using the actual withVersions I can add a
new one lets say... withVersionInfos that also force withVersions to
false false when withVersionInfos=false.

WDYT ?

2007/10/12, Jean-Vincent Drean <[hidden email]>:

> 2007/10/12, Erin Schnabel <[hidden email]>:
> > WAIT WAIT WAIT...
> >
> > We already went through this. When I export a document (say an
> > application), I want to be able to export it without the version
> > history, but with other attributes preserved!!
>
> I'd be curious to know in which use case, could you explain it ?
>
> > Perhaps it could be combined with the preserveVersion flag?
> >
> > If withVersions is false and preserveVersion is false then clear those fields,
> > if withVersions is false, and preserveVersion is true then leave the
> > fields alone,
> > if withVersions is true, leave the fields alone
>
> If this is going to be implemented I'd be +1 to rename preserveVersion
> to preserveAttributes or withAttributes since the current names are
> confusing.
>
> JV.
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>


--
Thomas Mortagne
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [Package plugin] Export documents with withVersions=false

Thomas Mortagne
Administrator
At least I revert the change for 1.1 as it's not really a bug or a
really string need (even if app manager is based on 1.1 and will
benefit of this modification), we'll see for 1.2.

2007/10/12, Thomas Mortagne <[hidden email]>:

> Well... maybe in place of using the actual withVersions I can add a
> new one lets say... withVersionInfos that also force withVersions to
> false false when withVersionInfos=false.
>
> WDYT ?
>
> 2007/10/12, Jean-Vincent Drean <[hidden email]>:
> > 2007/10/12, Erin Schnabel <[hidden email]>:
> > > WAIT WAIT WAIT...
> > >
> > > We already went through this. When I export a document (say an
> > > application), I want to be able to export it without the version
> > > history, but with other attributes preserved!!
> >
> > I'd be curious to know in which use case, could you explain it ?
> >
> > > Perhaps it could be combined with the preserveVersion flag?
> > >
> > > If withVersions is false and preserveVersion is false then clear those fields,
> > > if withVersions is false, and preserveVersion is true then leave the
> > > fields alone,
> > > if withVersions is true, leave the fields alone
> >
> > If this is going to be implemented I'd be +1 to rename preserveVersion
> > to preserveAttributes or withAttributes since the current names are
> > confusing.
> >
> > JV.
> > _______________________________________________
> > devs mailing list
> > [hidden email]
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
>
>
> --
> Thomas Mortagne
>


--
Thomas Mortagne
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [Package plugin] Export documents with withVersions=false

ebullient
That's a good plan.  I agree the names are wonky, but it's that n-2
compatibility thing. ;)

(at least, I go for n-2, as people are always slow to move..)

On 10/13/07, Thomas Mortagne <[hidden email]> wrote:

> At least I revert the change for 1.1 as it's not really a bug or a
> really string need (even if app manager is based on 1.1 and will
> benefit of this modification), we'll see for 1.2.
>
> 2007/10/12, Thomas Mortagne <[hidden email]>:
> > Well... maybe in place of using the actual withVersions I can add a
> > new one lets say... withVersionInfos that also force withVersions to
> > false false when withVersionInfos=false.
> >
> > WDYT ?
> >
> > 2007/10/12, Jean-Vincent Drean <[hidden email]>:
> > > 2007/10/12, Erin Schnabel <[hidden email]>:
> > > > WAIT WAIT WAIT...
> > > >
> > > > We already went through this. When I export a document (say an
> > > > application), I want to be able to export it without the version
> > > > history, but with other attributes preserved!!
> > >
> > > I'd be curious to know in which use case, could you explain it ?
> > >
> > > > Perhaps it could be combined with the preserveVersion flag?
> > > >
> > > > If withVersions is false and preserveVersion is false then clear those fields,
> > > > if withVersions is false, and preserveVersion is true then leave the
> > > > fields alone,
> > > > if withVersions is true, leave the fields alone
> > >
> > > If this is going to be implemented I'd be +1 to rename preserveVersion
> > > to preserveAttributes or withAttributes since the current names are
> > > confusing.
> > >
> > > JV.
> > > _______________________________________________
> > > devs mailing list
> > > [hidden email]
> > > http://lists.xwiki.org/mailman/listinfo/devs
> > >
> >
> >
> > --
> > Thomas Mortagne
> >
>
>
> --
> Thomas Mortagne
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>


--
'Waste of a good apple' -Samwise Gamgee
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs