Skip to content

Conversation

julien-vaz
Copy link
Contributor

Description

On the assignVirtualMachine API form, when switching domains or accounts, the selected tier field isn't being cleaned up. For example, with the nw tier of admin account selected, when selecting the user account, the nw tier remains as the selected one.

Therefore, a fix was made in order to refresh the selected tier field whenever another domain or account is selected.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

How Has This Been Tested?

A new User account and a new domain-test domain with a Domain Admin account inside were created, as well as tiers for both accounts.

  1. Selected the admin account and nw tier;
  2. Selected the user account and verified that the selected tier field was cleaned up on the form and the list was refreshed;
  3. Selected the domain-test and verified that the selected tier field was cleaned up on the form and the list was refresh again.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where the selected tier field in the assignVirtualMachine API form wasn't being cleared when switching between domains or accounts, causing previously selected tiers to remain visible even when they shouldn't be available for the new selection.

  • Adds cleanup logic to reset the selected tier when domain/account changes
  • Ensures the tier dropdown is properly refreshed when switching contexts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.35%. Comparing base (f2d6356) to head (bcf7fc8).

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11464   +/-   ##
=========================================
  Coverage     17.35%   17.35%           
- Complexity    15230    15235    +5     
=========================================
  Files          5886     5886           
  Lines        525685   525686    +1     
  Branches      64159    64159           
=========================================
+ Hits          91247    91256    +9     
+ Misses       424138   424130    -8     
  Partials      10300    10300           
Flag Coverage Δ
uitests 3.63% <ø> (-0.01%) ⬇️
unittests 18.39% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DaanHoogland
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11464 (QA-JID-729)

@sureshanaparti sureshanaparti changed the title Add cleanup for tiers dropdown on assignVIrtualMachine API form Add cleanup for tiers dropdown on assignVirtualMachine API form Aug 19, 2025
Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm, not sure if this is being called in some undesirable scenarios as well though.

@julien-vaz
Copy link
Contributor Author

clgtm, not sure if this is being called in some undesirable scenarios as well though.

Hi, Daan. As far as I checked, fetchNetworks() is called only by fetchOwnerOptions(), when the user switches accounts, domains or projects.

@DaanHoogland
Copy link
Contributor

tested in qa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants