feat(workitems): Add more fields to WorkItem
Adds the following fields to the WorkItem struct, sourced from the corresponding GraphQL widgets:
- Color
- Confidential
- DueDate / StartDate
- HealthStatus
- IterationID
- Labels
- LinkedItems
- MilestoneID
- ParentID
- Status
- Weight
The workItemFeaturesGQL struct is refactored from a flat, ad-hoc
structure into individual typed widget structs (one per widget), each
with its own nil-safe unwrap() method. This matches the shape of the
GraphQL API, where each widget is an independent nullable object, and
makes it straightforward to add further widgets in the future.
The new WorkItemIID type is used to reference other work items in the ParentID and LinkedItems fields.
When introducing the work items API, we made a conscious decision to identify work items by namespace path and IID rather than their global ID.
The new type combines these two pieces of identifying information so it is easier to return and work with.
Two smaller fixes are included:
-
userCoreBasicGQL.unwrap()now has a pointer receiver and handlesnilreceivers gracefully, preventing a panic when the author field is absent on a work item.