Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-6696] Collections not loading when adding item #8691

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

gbubemismith
Copy link
Member

Type of change

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

Objective

Currently, when creating an item under an organization, collections are not loaded, and because of this, the item cannot be saved. The objective of this ticket is to ensure collections load when displaying the form when adding a new item.

Code changes

The collections were loaded in ngOnInit, which is not executed until after the first ngOnChanges call. As a result, when ngOnChanges needed the collections immediately (such as when adding a new item), they were unavailable.

To fix this bug, I ensure collections are always loaded before they are needed.

Screenshots

Screen.Recording.2024-04-11.at.11.58.51.AM.mov

Before you submit

  • 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
  • Ensure that all UI additions follow WCAG AA requirements

@gbubemismith gbubemismith requested a review from a team as a code owner April 11, 2024 11:21
@github-actions github-actions bot added the needs-qa Marks a PR as requiring QA approval label Apr 11, 2024
Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 27.20%. Comparing base (9b022d2) to head (fe7e011).

Files Patch % Lines
.../desktop/src/vault/app/vault/add-edit.component.ts 0.00% 1 Missing ⚠️
...angular/src/vault/components/add-edit.component.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8691      +/-   ##
==========================================
- Coverage   27.20%   27.20%   -0.01%     
==========================================
  Files        2339     2339              
  Lines       68267    68268       +1     
  Branches    12749    12750       +1     
==========================================
  Hits        18570    18570              
- Misses      48301    48302       +1     
  Partials     1396     1396              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Detailse2b78f77-709f-4d3c-b47b-3af8e35be813

No New Or Fixed Issues Found

@gbubemismith gbubemismith merged commit a12c724 into main Apr 12, 2024
64 checks passed
@gbubemismith gbubemismith deleted the vault/PM-6696 branch April 12, 2024 13:53
@djsmith85 djsmith85 linked an issue Apr 12, 2024 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-qa Marks a PR as requiring QA approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collections not loading when adding item
2 participants