[PR #6228] [MERGED] [PM-28467] Add revisionDate to policy JSON model #48019

Closed
opened 2026-04-26 15:33:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6228
Author: @SaintPatrck
Created: 12/4/2025
Status: Merged
Merged: 12/4/2025
Merged by: @SaintPatrck

Base: mainHead: PM-28467/add-revision_date-to-policy-json


📝 Commits (2)

  • 050bf11 [PM-28467] Add revisionDate to policy JSON model
  • 6c1d542 PM-28467: Fix test failures from Policy revisionDate field

📊 Changes

13 files changed (+39 additions, -26 deletions)

View changed files

📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/manager/UserStateManagerTest.kt (+2 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/UserStateJsonExtensionsTest.kt (+3 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/util/PolicyManagerExtensionsTest.kt (+3 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerTest.kt (+4 -4)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModelTest.kt (+3 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModelTest.kt (+1 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/addedit/AddEditSendViewModelTest.kt (+2 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt (+3 -3)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModelTest.kt (+2 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt (+4 -3)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModelTest.kt (+4 -3)
📝 network/src/main/kotlin/com/bitwarden/network/model/SyncResponseJson.kt (+5 -0)
📝 network/src/testFixtures/kotlin/com/bitwarden/network/model/SyncResponsePolicyUtil.kt (+3 -0)

📄 Description

🎟️ Tracking

PM-28467
Relates to https://github.com/bitwarden/server/pull/6602

📔 Objective

Add the revisionDate field to the SyncResponseJson.Policy data class to align with server-side API changes introduced for the Item Organization feature (PM-28440).

Changes:

  • Added nullable revisionDate: ZonedDateTime? field to SyncResponseJson.Policy with proper @SerialName and @Contextual annotations
  • Updated KDoc documentation to include the new property
  • Enhanced createMockPolicy test utility to support the new field with a backwards-compatible default value

Impact:
This is an additive, non-breaking change. The nullable field ensures backwards compatibility with API responses that don't yet include revisionDate. Existing tests continue to pass without modification, and policies will now capture revision timestamps when provided by the server.

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6228 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 12/4/2025 **Status:** ✅ Merged **Merged:** 12/4/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-28467/add-revision_date-to-policy-json` --- ### 📝 Commits (2) - [`050bf11`](https://github.com/bitwarden/android/commit/050bf115672e4f3daf8f192a50ee4697d302c90c) [PM-28467] Add revisionDate to policy JSON model - [`6c1d542`](https://github.com/bitwarden/android/commit/6c1d54220a41a3775aa571699de99bb50a90cdb7) PM-28467: Fix test failures from Policy revisionDate field ### 📊 Changes **13 files changed** (+39 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/manager/UserStateManagerTest.kt` (+2 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/UserStateJsonExtensionsTest.kt` (+3 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/util/PolicyManagerExtensionsTest.kt` (+3 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerTest.kt` (+4 -4) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModelTest.kt` (+3 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModelTest.kt` (+1 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/addedit/AddEditSendViewModelTest.kt` (+2 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt` (+3 -3) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModelTest.kt` (+2 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt` (+4 -3) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModelTest.kt` (+4 -3) 📝 `network/src/main/kotlin/com/bitwarden/network/model/SyncResponseJson.kt` (+5 -0) 📝 `network/src/testFixtures/kotlin/com/bitwarden/network/model/SyncResponsePolicyUtil.kt` (+3 -0) </details> ### 📄 Description ## 🎟️ Tracking PM-28467 Relates to https://github.com/bitwarden/server/pull/6602 ## 📔 Objective Add the `revisionDate` field to the `SyncResponseJson.Policy` data class to align with server-side API changes introduced for the Item Organization feature (PM-28440). Changes: - Added nullable `revisionDate: ZonedDateTime?` field to `SyncResponseJson.Policy` with proper `@SerialName` and `@Contextual` annotations - Updated KDoc documentation to include the new property - Enhanced `createMockPolicy` test utility to support the new field with a backwards-compatible default value Impact: This is an additive, non-breaking change. The nullable field ensures backwards compatibility with API responses that don't yet include revisionDate. Existing tests continue to pass without modification, and policies will now capture revision timestamps when provided by the server. ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-26 15:33:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#48019