Menu

The count moved, the list didn't: refreshing work item children after /add_child
📰

The count moved, the list didn't: refreshing work item children after /add_child

DEV Community: gitlab·Priyanshu Jha·4 days ago
#kcoUnjUD
#devtogitlab#devto#dev#gitlab#refetch
Long article (966 words) — no AI summary yet.
Reading 0:00
15s threshold

You post /add_child #2 on a work item. The hierarchy widget's count ticks up. The child list does not change until you refresh the page. /remove_child does the same thing in reverse: the count is right, the list is not.

This is the story of gitlab-org/gitlab!272650 , a short-term refetch that made the list catch up, and a cache detail that, in the first version, refetched every notes page after each successful command.

The issue: two queries, one of them stale

The issue was gitlab-org/gitlab#498118 , opened by Amanda Rueda. The investigation in the issue is the important part. WorkItemUpdated , and the main work item query, include hierarchy counts ( rolledUpCountsByType ) but not the children connection. That connection lives only on workItemTreeQuery . The count in the widget can change while the list stays stale.

A fuller fix would be a hierarchy subscription. That had been tried and removed for performance and UX reasons.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.