[PR #1668] [MERGED] Fix Crash produced when adding a custom field on a Secure Note #3043

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1668
Author: @fedemkr
Created: 11/29/2021
Status: Merged
Merged: 11/29/2021
Merged by: @fedemkr

Base: masterHead: fix-crash-custom-field-secure-note


📝 Commits (1)

  • 0201c9e Fix crash produced when adding a custom field on a Secure Note, because it try to load the control of linked fields even if it's not the type

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/App/Pages/Vault/AddEditPageViewModel.cs (+1 -1)

📄 Description

Type of change

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

Objective

Fix crash produced when adding a custom field on a Secure Note, because it tries to load Linked field picker even if the type of the custom field is not Linked. This happens because the Linked picker is on the same view.

Code changes

  • AddEditPageViewModel.cs: Added null check to avoid crash when loading LInkedFieldOptions on SecureNote on other type of custom fields.

Screenshots

Testing requirements

Try to add each type of custom field on Secure Notes; and also a Linked custom field on some other Cypher.

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 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/1668 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 11/29/2021 **Status:** ✅ Merged **Merged:** 11/29/2021 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `master` ← **Head:** `fix-crash-custom-field-secure-note` --- ### 📝 Commits (1) - [`0201c9e`](https://github.com/bitwarden/android/commit/0201c9efed2285bfcf7980ad30a264f5a9084de9) Fix crash produced when adding a custom field on a Secure Note, because it try to load the control of linked fields even if it's not the type ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Vault/AddEditPageViewModel.cs` (+1 -1) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] 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--> Fix crash produced when adding a custom field on a Secure Note, because it tries to load Linked field picker even if the type of the custom field is not Linked. This happens because the Linked picker is on the same view. ## 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--> * **AddEditPageViewModel.cs:** Added null check to avoid crash when loading LInkedFieldOptions on SecureNote on other type of custom fields. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> Try to add each type of custom field on Secure Notes; and also a Linked custom field on some other Cypher. ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] This change has particular **deployment requirements** (notify the DevOps team) --- <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 2025-11-26 23:27:33 -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#3043