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-10915] Ownership does not default to the organization you are in when creating a new item #1333

Merged

Conversation

LRNcardozoWDF
Copy link
Member

@LRNcardozoWDF LRNcardozoWDF commented Feb 6, 2025

🎟️ Tracking

PM-10915

📔 Objective

When adding an item after selecting an organization in vault filter, show that organization as owner in the add item view.

⏰ 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

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.61%. Comparing base (b15f660) to head (76ef9cd).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1333   +/-   ##
=======================================
  Coverage   89.60%   89.61%           
=======================================
  Files         750      750           
  Lines       47035    47043    +8     
=======================================
+ Hits        42148    42156    +8     
  Misses       4887     4887           

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

Copy link
Contributor

github-actions bot commented Feb 6, 2025

Logo
Checkmarx One – Scan Summary & Details3005d26c-14f4-47e4-8385-e87b5369bf87

Great job, no security vulnerabilities found in this Pull Request

@LRNcardozoWDF LRNcardozoWDF marked this pull request as ready for review February 6, 2025 22:55
Copy link
Member

@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

🤔 Instead of using selectedOrganizationId I'd use ownerOrganizationId or even simpler organizationId.
The reason behind that is that other objects shouldn't need to know that something was selected or which was the operation from which you got the org id value. I think it's more important to state what that value represents for the flow so if in the future this flow is called from another place where the Org id comes from another place e.g. some external request or from the server then we'd need to refactor the name; however by using a simpler name stating what the value represents lowers the chances of needing a refactor for this.
Thoughts?

@LRNcardozoWDF
Copy link
Member Author

@fedemkr Thank you for your feedback!
I agree with both approaches, my idea was to have code easier to read. On the other hand, choosing a simpler name could prevent further work/refactor. I'll change this to organizationId .

@LRNcardozoWDF LRNcardozoWDF merged commit 4ea321e into main Feb 10, 2025
9 checks passed
@LRNcardozoWDF LRNcardozoWDF deleted the cmcg/pm-10915-ownership-not-defaults-to-selected-org branch February 10, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants