Mikolaj Antoszkiewicz
2008-06-06 11:21:40 UTC
Hello,
Why the messages for the constraints have been left out? The standard
error messages are big nad ugly :). Why not set here more user friendly
ones?
method getPortalNodeTypeList which returns only 'Person'.
Should there be three portal types (as above) listed explicitely in
Portal Types attribute, or rather the method needs fixing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3229 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080606/0527289c/attachment.bin>
Why the messages for the constraints have been left out? The standard
error messages are big nad ugly :). Why not set here more user friendly
ones?
+ """
+ Constraintsts For Task
+ """
+
+ _constraints = (
+ { 'id' : 'title_existence',
+ 'description' : 'Title must be defined',
+ 'type' : 'StringAttributeMatch',
+ 'title' : '^[^ ]',
+ },
+ { 'id' : 'source',
+ 'description' : 'Source must be defined',
+ 'type' : 'CategoryMembershipArity',
+ 'min_arity' : '1',
+ 'max_arity' : '1',
+ 'portal_type' : ('Person', 'Organisation', 'Category'),
+ 'base_category' : ('source',)
+ },
In the RelationStringField for source and destination there's used a+ Constraintsts For Task
+ """
+
+ _constraints = (
+ { 'id' : 'title_existence',
+ 'description' : 'Title must be defined',
+ 'type' : 'StringAttributeMatch',
+ 'title' : '^[^ ]',
+ },
+ { 'id' : 'source',
+ 'description' : 'Source must be defined',
+ 'type' : 'CategoryMembershipArity',
+ 'min_arity' : '1',
+ 'max_arity' : '1',
+ 'portal_type' : ('Person', 'Organisation', 'Category'),
+ 'base_category' : ('source',)
+ },
method getPortalNodeTypeList which returns only 'Person'.
Should there be three portal types (as above) listed explicitely in
Portal Types attribute, or rather the method needs fixing?
+ { 'id' : 'destination',
+ 'description' : 'Destination must be defined',
+ 'type' : 'CategoryMembershipArity',
+ 'min_arity' : '1',
+ 'max_arity' : '1',
+ 'portal_type' : ('Person', 'Organisation', 'Category'),
+ 'base_category' : ('destination',)
+ },
+ { 'id' : 'start_date_existence',
+ 'description' : 'Property start_date must be defined',
+ 'type' : 'PropertyExistence',
+ 'start_date' : None,
+ },
+ { 'id' : 'stop_date_existence',
+ 'description' : 'Property stop date must be defined',
+ 'type' : 'PropertyExistence',
+ 'stop_date' : None,
+ },
+
+ { 'id' : 'lines',
+ 'description' : 'Lines must be defined',
+ 'type' : 'ContentExistence',
+ 'portal_type' : ('Task Line', 'Task Report Line' ),
+ },
+ )
+
Mikolaj+ 'description' : 'Destination must be defined',
+ 'type' : 'CategoryMembershipArity',
+ 'min_arity' : '1',
+ 'max_arity' : '1',
+ 'portal_type' : ('Person', 'Organisation', 'Category'),
+ 'base_category' : ('destination',)
+ },
+ { 'id' : 'start_date_existence',
+ 'description' : 'Property start_date must be defined',
+ 'type' : 'PropertyExistence',
+ 'start_date' : None,
+ },
+ { 'id' : 'stop_date_existence',
+ 'description' : 'Property stop date must be defined',
+ 'type' : 'PropertyExistence',
+ 'stop_date' : None,
+ },
+
+ { 'id' : 'lines',
+ 'description' : 'Lines must be defined',
+ 'type' : 'ContentExistence',
+ 'portal_type' : ('Task Line', 'Task Report Line' ),
+ },
+ )
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3229 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080606/0527289c/attachment.bin>