[ https://issues.apache.org/jira/browse/CONNECTORS-1549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16655562#comment-16655562 ]
Julien Massiera commented on CONNECTORS-1549: --------------------------------------------- After some tests, I noticed that the problem only happens when exclude rules are all defined BEFORE include rules. For example, here is my original job configuration : !image-2018-10-18-18-34-01-542.png! and here is the extract of the JSON generated for the API for this job : {code:java} "startpoint": { "include": { "_attribute_filespec": "*", "_value_": "", "_attribute_type": "file" }, "_attribute_path": "ocr", "_value_": "", "exclude": [ { "_attribute_filespec": "*.pst", "_value_": "", "_attribute_type": "file" }, { "_attribute_filespec": "*", "_value_": "", "_attribute_type": "directory" } ] } {code} When re-creating the job thanks to the same JSON here is the new job configuration: !image-2018-10-18-18-33-01-577.png! When executing my original job, the pst files are correctly filtered, but when executing the job created from the generated JSON, they are not excluded from the process. However, if I create a job that combines include and exclude rules, the JSON generated by the API uses a different format for the filters : {code:java} "startpoint": { "_children_": [ { "_type_": "include", "_attribute_filespec": "/subfolder1/", "_value_": "", "_attribute_type": "directory" }, { "_type_": "exclude", "_attribute_filespec": "*", "_value_": "", "_attribute_type": "directory" }, { "_type_": "include", "_attribute_filespec": "*", "_value_": "", "_attribute_type": "file" } ], "_attribute_path": "ocr", "_value_": "" }{code} In that case, the order is respected and the job behavior is what I expect. > Include and exclude rules order lost > ------------------------------------ > > Key: CONNECTORS-1549 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1549 > Project: ManifoldCF > Issue Type: Bug > Components: API, JCIFS connector > Affects Versions: ManifoldCF 2.11 > Reporter: Julien Massiera > Assignee: Karl Wright > Priority: Critical > Attachments: image-2018-10-18-18-28-14-547.png, > image-2018-10-18-18-33-01-577.png, image-2018-10-18-18-34-01-542.png > > > The include and exclude rules that can be defined in the job configuration > for the JCIFS connector can be combined and the defined order is really > important. > The problem is that when one retrieve the job configuration as a json object > through the API, the include and exclude rules are splitted in two diffrent > arrays instead of one (one for each type of rule). So, the order is > completely lost when one try to recreate the job thanks to the API and the > JSON object. -- This message was sent by Atlassian JIRA (v7.6.3#76005)