Issue 221 in dexterity: Code of packages that enable versioning need review/merge

22 views
Skip to first unread message

dext...@googlecode.com

unread,
Jul 27, 2011, 7:31:40 AM7/27/11
to dexterity-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 221 by rafaelbco: Code of packages that enable versioning need
review/merge
http://code.google.com/p/dexterity/issues/detail?id=221

The current versioning story is documented here [1]. Two packages in the
collective are needed to enable versioning: collective.dexteritydiff and
collective.cmfeditionsdexteritycompat. As discussed in the mailing list [2]
these packages need review and perhaps merging into
plone.app.versioningbehavior.


[1]
http://plone.org/products/dexterity/documentation/how-to/adding-versioning-to-dexterity-content-types

[2]
http://groups.google.com/group/dexterity-development/browse_thread/thread/72da9c7b1c7202e8/31f91a9e8c4236f3?pli=1

dext...@googlecode.com

unread,
Nov 13, 2011, 11:14:57 PM11/13/11
to dexterity-...@googlegroups.com
Updates:
Labels: -Type-Defect Type-Enhancement

Comment #1 on issue 221 by dgl...@gmail.com: Code of packages that enable

(No comment was entered for this change.)

dext...@googlecode.com

unread,
Nov 22, 2011, 6:49:06 AM11/22/11
to dexterity-...@googlegroups.com

Comment #2 on issue 221 by derschm...@gmail.com: Code of packages that

Following the documentation above I ran into an error with versioning and
the keywords-field provided by the default-metadata-behaviour.

collective.dexteritydiff iterates over the fields in the schema with
getFieldsInOrder resulting in an AttributeError on "subjects" since the
instance only responds to "subject":

(Pdb) pp getFieldsInOrder(schema)
[('title', <zope.schema._bootstrapfields.TextLine object at 0x10720b190>),
('description', <zope.schema._bootstrapfields.Text object at 0x10720b250>),
('subjects', <zope.schema._field.Tuple object at 0x1071f8f90>),
('language', <zope.schema._field.Choice object at 0x10720b390>),
('effective', <zope.schema._field.Datetime object at 0x107207bd0>),
('expires', <zope.schema._field.Datetime object at 0x10720b490>),
('creators', <zope.schema._field.Tuple object at 0x10720b5d0>),
('contributors', <zope.schema._field.Tuple object at 0x10720b690>),
('rights', <zope.schema._bootstrapfields.Text object at 0x10720b6d0>)]
(Pdb) obj1.subjects
*** AttributeError: subjects
(Pdb) obj1.subject
(u'fsgdsa',)
(Pdb) obj2.subject
(u'fsgdsa', u'tree')

I was not sure about how to proceed from here...

dext...@googlecode.com

unread,
Nov 22, 2011, 12:07:35 PM11/22/11
to dexterity-...@googlegroups.com

Comment #3 on issue 221 by dgl...@gmail.com: Code of packages that enable

@derschmock: Field values are not necessarily available as attributes of
the item. That should be the case for fields on the main schema, but for
fields coming from behaviors, you have to adapt the item to the behavior
interface and then access attributes of the behavior adapter.

dext...@googlecode.com

unread,
Sep 17, 2012, 9:09:04 PM9/17/12
to dexterity-...@googlegroups.com

Comment #4 on issue 221 by c...@crisewing.com: Code of packages that enable
I've gotten started working on this code. I will be moving both packages
to the github repository shortly, and then most likely working on merging
them into p.a.versioningbehavior as part of proper versioning support for
dexterity.



dext...@googlecode.com

unread,
Sep 17, 2012, 11:08:45 PM9/17/12
to dexterity-...@googlegroups.com

Comment #5 on issue 221 by c...@crisewing.com: Code of packages that enable
I've now requested the new repos in github. I've also exported the
existing svn repos to local git repos and will push them up to github as
soon as those repositories are added to the collective.

Forward!

dext...@googlecode.com

unread,
Sep 19, 2012, 11:53:50 PM9/19/12
to dexterity-...@googlegroups.com

Comment #6 on issue 221 by c...@crisewing.com: Code of packages that enable
This is now complete. The repositories can be found on github now. I'd
clear the trunks on the old svn, but it won't accept writes anymore :(

Anyway, onward and upward.

Reply all
Reply to author
Forward
0 new messages