JSON-LD Import ignore the `list` field

Version: 1.16.2

When I import JSON-lD (strictly following the export format), the list properties on an item is all ignored despite the items are imported correctly in respect of other fields. The importing behavior respect the drag-and-drop.

This is a snippet of the JSON-LD import file:

    {
      "@type": "Item",
      "template": "https://tropy.org/v1/templates/generic",
      "title": "2. Gap",
      "list": [
        "Encyclopedia",
        "Part 4",
        "G",
      ],

I looked up in the source code, the list is being commented out (6 years ago) might be the cause.

Is it intentional? Is there plan to bring back the feature?

Yes, it’s intentional, but we’ve been exploring ideas how lists could be included in the import. The main reason why we’ve excluded is, is because some projects have specific list structures and e.g., copy pasting items between project windows, you wouldn’t want this to change your list structure. Also, when you import or paste items, you’re importing them into the current list (if you have a list selected), so it would be surprising that the item also gets added to other lists as well. Furthermore, with tags it’s easy to create tags if they are missing, because the tags are defined by their names. But two lists with the same name in different projects are not necessarily the ‘same’ list in the same way tags are.

That said, we could add an import option that includes the lists. The main utility I’d see for this is that it would essentially offer an easy way to duplicate an entire project (basically: select all, copy, and paste into an empty project).

1 Like

Indeed, my use case here is to modify the structure of list outside Tropy and import them back.