Skip to content

Fix project selection after changing Jira sites#1902

Open
GagandeepSingh20 wants to merge 1 commit into
atlassian:mainfrom
GagandeepSingh20:fix/project-selection-after-site-change
Open

Fix project selection after changing Jira sites#1902
GagandeepSingh20 wants to merge 1 commit into
atlassian:mainfrom
GagandeepSingh20:fix/project-selection-after-site-change

Conversation

@GagandeepSingh20

@GagandeepSingh20 GagandeepSingh20 commented Jul 13, 2026

Copy link
Copy Markdown

What Is This Change?

Fixes #1896.

This change fixes the selected Jira project disappearing from the project dropdown after switching Jira sites.

The issue was caused by inconsistent project identifiers:

  • Initial project options used project.id.
  • Project options loaded after changing sites used project.key.
  • The selected project value was still represented by project.id.

Because the dropdown option value and selected project value did not match, the selected project could not be displayed.

This change standardizes the project option value on project.id in the UpdatedSelectedSite reducer path.

A regression test has also been added to verify that, after changing Jira sites, the selected project ID matches the corresponding project option value.

How Has This Been Tested?

Added a focused React unit test covering the UpdatedSelectedSite reducer flow.

The test verifies that:

  • Project options use project.id as their value.
  • The selected project ID matches the corresponding dropdown option value after changing Jira sites.

Command used:

npm run test:react -- --runTestsByPath \
  src/react/atlascode/create-work-item/utils.test.tsx \
  --runInBand

Result:

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total

Basic checks:

  • npm run lint
  • npm run test

Advanced checks:

Recommendations:

  • Update the CHANGELOG if making a user facing change

Rovo Dev code review: Rovo Dev couldn't review this pull request
The pull request author does not have access to Rovo Dev.

@atlassian-cla-bot

atlassian-cla-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

Hooray! All contributors have signed the CLA.

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.

Create Work Item loses selected project after changing Jira site

1 participant