Expose modified_gmt on PostMetadataCollectionItem

Open Beginner friendly
#1,690 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@winshaurya is already working on this.

Since Nov 4, 2026.

  • #1724 by @winshaurya — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
api

Research direction

Read the collection item macro in wp_mobile/src/collection/mod.rs around lines 130–219 and check how it copies parent and menu_order from EntityMetadata. Add modified_gmt to PostMetadataCollectionItem using the same list metadata source; done when the item exposes Option<WpGmtDateTime> before the full post is fetched.

Written by the indexing model from the issue text.

Description

EntityMetadata already carries modified_gmt from the list metadata fetch, but the collection item macro in wp_mobile/src/collection/mod.rs only copies id, parent and menu_order onto PostMetadataCollectionItem (lines ~130–219). Please expose modified_gmt: Option<WpGmtDateTime> on the item too, the same way parent and menu_order are: from list metadata, available before the full post is fetched.

Why: WordPress-Android now sorts its Drafts and Trashed lists by orderby=modified (wordpress-mobile/WordPress-Android#23429), and shows and groups each row by that date. A row's position comes from the fresh list metadata, but its date can only come from the cached entity. So for Stale, FetchingWithData and FailedWithData items the row moves to its new position while still showing the old modified date, and it can open an out-of-order date header ("Last month" between "Today" rows). The mismatch lasts until the entity re-fetch lands. For FailedWithData it lasts until the next refresh.

With modified_gmt on the item, the app would use item.modifiedGmt ?: data.modifiedGmt, so the date always matches the position.

Reported in review: wordpress-mobile/WordPress-Android#23429 (comment 6317096026).

Dominant language
Rust
Stars
38
Forks
6
Avg merge
2d 3h
Merged PRs (30d)
50

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/wordpress-rs

All issues in Automattic/wordpress-rs

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.