[PR #3150] [PM-7407] Implemented check for organizations with unassigned items #4053

Closed
opened 2025-11-26 23:40:04 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/3150

State: closed
Merged: Yes


Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Add check for organization with unassigned items to display a message to the user if it's needed.

Code changes

  • Constants: Added new feature flag for this check
  • ApiService: Added new endpoint call to check whether the organization has any unassigned items
  • CipherService: Added method to verify if an organization has any unassigned items
  • AppOptions: Added flag to see if the user has just logged in / unlocked their vault when displaying the GroupingsPage
    • Other files related with AppOptions: Updated the new flag of AppOptions and passed along the options object to get to the GroupingsPage
  • StateService: Added new Get/Set method for the flag of if one should or not perform this check
  • GroupingsPageViewModel: Added logic to check the organization unassigned items based on the feature flag and the "should check" local flag (depending on what the user chose on an already shown dialog). Also, it waits if a sync is in progress to have the latest data locally as I'm checking whether the user has any organizations so not to call the endpoint on the cases where the user doesn't belong to an org.

Screenshots

Unassigned items notice iOS

Unassigned items notice iOS Unassigned items notice iOS

Unassigned items notice Android

Unassigned items notice Android Unassigned items notice Android

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
**Original Pull Request:** https://github.com/bitwarden/android/pull/3150 **State:** closed **Merged:** Yes --- ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Add check for organization with unassigned items to display a message to the user if it's needed. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **Constants:** Added new feature flag for this check * **ApiService:** Added new endpoint call to check whether the organization has any unassigned items * **CipherService:** Added method to verify if an organization has any unassigned items * **AppOptions:** Added flag to see if the user has just logged in / unlocked their vault when displaying the `GroupingsPage` * **Other files related with AppOptions**: Updated the new flag of `AppOptions` and passed along the options object to get to the `GroupingsPage` * **StateService:** Added new Get/Set method for the flag of if one should or not perform this check * **GroupingsPageViewModel:** Added logic to check the organization unassigned items based on the feature flag and the "should check" local flag (depending on what the user chose on an already shown dialog). Also, it waits if a sync is in progress to have the latest data locally as I'm checking whether the user has any organizations so not to call the endpoint on the cases where the user doesn't belong to an org. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ### Unassigned items notice iOS <img width="314" alt="Unassigned items notice iOS" src="https://github.com/bitwarden/mobile/assets/15682323/c77aa9ac-d1ae-457b-b961-29d1ff715adb"> <img width="314" alt="Unassigned items notice iOS" src="https://github.com/bitwarden/mobile/assets/542036/6c9157b1-729b-4c6c-83ce-af3145091d08"> ### Unassigned items notice Android <img width="314" alt="Unassigned items notice Android" src="https://github.com/bitwarden/mobile/assets/15682323/873f9df3-d15a-46dc-a525-b312ec30adfe"> <img width="314" alt="Unassigned items notice Android" src="https://github.com/bitwarden/mobile/assets/542036/6086db5a-d31b-4fcf-b920-1bbd5442d8f2"> ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team
GiteaMirror added the pull-request label 2025-11-26 23:40:04 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#4053