My Query is like that:
Code: Select all
select * from polarion.WorkItem
where polarion.WorkItem.c_pk in (select * from polarion.lucene_query('WorkItem', 'type:customerrequirement AND document.title:(CustomReqs Platform XY)', 'id'))
AND c_deleted is false AND fk_project = [$project_id];
But the result is missing most of the Items visible via the WebInterface - the result is the same with matching via c_URI instead of c_pk, or with querying STRUCT_WORKITEM_LINKEDWORKITEMS.
STRUCT_WORKITEM_LINKEDWORKITEMSDERIVED is an empty Table, so no luck there, either.
I've read the SQL-Documents in the /sdk/-Folder in our local install, but can't figure it out on my own.
Iam thankful for every hint, on how to get all links from a Workitem out of the database.