Add parameter to include steps for API endpoint item-search
Background
We ingest the SSK data as workflows and steps. In the SSK there are references to further material on a Zotero library that we also ingest and where we create a relation between SSK items and the SSK Zotero material. Due to the data model of the SSK, such relations are usually created on the level of step. Thus in the ingestion a relation between an MP-step and an MP-item is created (step x references tool-service/training-material y). We don't show steps directly on the MP but the referenced items are shown. These items do have relations to the step. One example on stage: /training-material/aHQJuK
(API call: /api/training-materials/aHQJuK
). Ingestion and presentation works for this relations.
Problem
But we run into a problem when editing such an item or adding to an item relations to steps. In the frontend this is solved by an autocomplete combobox and using the API endpoint /api/item-search?q=[Label of item]
. This API endpoint does not deliver back steps. This leads to the strange situation, that for the afore mentioned item you will not see the steps that they refer to. It is also currently in general therefore not possible to add relations to steps on the frontend.
Solution
Based on this a solution would be to add a parameter to the API endpoint item-search
to return back also steps. It should be not by default, that steps are returned (as steps are not rendered as items by their own, we don't want them in the default search), but it is necessary in some situation. Something like /api/item-search?includeSteps=true&q=[Label of item/step]
should do the trick. What do you think @mkozak @ekalata @stefan.probst