Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

Conversation

@differsthecat
Copy link
Member

@differsthecat differsthecat commented Mar 1, 2022

Type of change

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

Objective

While working on this, I noticed that if a bulk share action fails, the items in the cipher view are updated to show that they transferred to the organization even though they were not.

The items in the vault that were attempted to be shared are then in this state until a sync is performed or the vault is refreshed.

Code changes

  • common/src/services/cipher.service.ts: Add try catch that reverts setting of items organizationId and collectionIds properties if the api call fails.

Testing requirements

Make sure that if an item fails to share to an organization (e.g. has attachments and is sent to a free org)

Before you submit

  • I have checked for linting errors (npm run lint) (required)
  • 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)

@differsthecat differsthecat requested a review from a team March 1, 2022 22:20
Copy link
Member

@eliykat eliykat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot!

@differsthecat differsthecat merged commit 8f5f694 into master Mar 2, 2022
@differsthecat differsthecat deleted the bug/remove-orgId-if-shareToOrg-fails branch March 2, 2022 13:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants