DSD-DBS / polarion-rest-api-client

An API Client for the Polarion REST API.
1 stars 0 forks source link

feat: Implement get single work item and detect truncated relationships #22

Closed micha91 closed 7 months ago

micha91 commented 7 months ago

We now also support requesting a single work item by its ID with all fields in one request. This includes all linked work items and attachments. According to the documentation, there will be a meta section in the relationships section, if linked work items or attachments were truncated. We use this knowledge to set newly introduced linked_work_items_truncated and attachments_truncated flags in the WorkItem class. Both default to False, but if a work item is returned by the client as result of a get request, we will only set these flags to False, if the corresponding field was requested (which is the case in the newly introduced get_work_item function, but can be customized in the other get_work_items functions) and if we know that the list of items is complete.