Discussion:
[Erp5-dev] Base_getRelatedDocumentList.xml-path.patch - too many documents found
Łukasz Nowak
2008-09-25 13:25:56 UTC
Permalink
Hello,

Script Base_getRelatedDocumentList from erp5_core skin is finding to
many documents related to object - contained one.

It is using path query like:
'%component_module/2%'

which matches documents:

'component_module/2/1'
'component_module/22/1'

Attached patch matches documents:

'component_module/2/1'

but not: 'component_module/22/1'

Is test for this needed or is it just enough?

Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Base_getRelatedDocumentList.xml-path.patch
Type: text/x-patch
Size: 599 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080925/f2d632ec/attachment.bin>
Romain Courteaud
2008-11-28 15:47:04 UTC
Permalink
Hi,

I commited your patch in
http://svn.erp5.org?rev=24744&view=rev

I don't think a test is required for now.

Thanks for your contribution,
Romain
Post by Łukasz Nowak
Hello,
Script Base_getRelatedDocumentList from erp5_core skin is finding to
many documents related to object - contained one.
'%component_module/2%'
'component_module/2/1'
'component_module/22/1'
'component_module/2/1'
but not: 'component_module/22/1'
Is test for this needed or is it just enough?
Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.
Index: Base_getRelatedDocumentList.xml
===================================================================
--- Base_getRelatedDocumentList.xml (revision 23819)
+++ Base_getRelatedDocumentList.xml (working copy)
@@ -55,7 +55,7 @@
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
portal_catalog = portal.portal_catalog\n
-path = "%" + "%s" % (context.getRelativeUrl()) + "%"\n
+path = "%" + "%s/" % (context.getRelativeUrl()) + "%"\n
\n
\n
# Get The documents in all storage structure. ie.: This scripts get all Files and Images\n
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
Loading...