manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <>
Subject [jira] [Commented] (CONNECTORS-1549) Include and exclude rules order lost
Date Thu, 18 Oct 2018 13:27:00 GMT


Karl Wright commented on CONNECTORS-1549:

Hi [~julienFL], there was a similar ticket a while back for the file system connector.  Let
me explain what the solution was and see if you still think there is a problem.

(1) The actual internal representation of a Document Specification is XML.
(2) For the API, we convert the XML to JSON and back.
(3) Because a complete and unambiguous conversion between these formats is quite ugly, we
have multiple ways of doing the conversion, so that we allow "syntactic sugar" in the JSON
for specific cases where the conversion can be done simply.
(4) A while back, there was a bug in the code that determined whether it was possible to use
syntactic sugar of the specific kind that would lead to two independent lists for the File
System Connector's document specification, so for a while what was *output* when you exported
the Job was incorrect, and order would be lost if you re-imported it.

The solution was to (a) fix the bug, and (b) get the person using the API to use the correct,
unambigious JSON format instead of the "sugary" format.  This preserves order.

The way to see if this is what you are up against is to create a JCIFS job with a complex
rule set that has both inclusions and exclusions.  If it looks different than what you are
expecting, then try replicating that format when you import via the API.

> Include and exclude rules order lost
> ------------------------------------
>                 Key: CONNECTORS-1549
>                 URL:
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: API, JCIFS connector
>    Affects Versions: ManifoldCF 2.11
>            Reporter: Julien Massiera
>            Assignee: Karl Wright
>            Priority: Critical
> 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

View raw message