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

[24.2] Fix handling of step id offsets when duplicating selections #19351

Open
wants to merge 2 commits into
base: release_24.2
Choose a base branch
from

Conversation

ElectronicBlueberry
Copy link
Member

@ElectronicBlueberry ElectronicBlueberry commented Dec 19, 2024

Ids were incremented by too much when the duplicated partial Workflow passed to the fromSimple function contained Ids, which did not start at 0, and could cause gaps in the workflows step ids. This was an unreachable state before selection duplication, which is why this bug appeared now.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 25.0 milestone Dec 19, 2024
@ElectronicBlueberry ElectronicBlueberry modified the milestones: 25.0, 24.2 Dec 19, 2024
@ElectronicBlueberry ElectronicBlueberry marked this pull request as draft December 19, 2024 12:58
@ElectronicBlueberry ElectronicBlueberry marked this pull request as ready for review December 19, 2024 13:32

Object.values(data.steps).forEach((step) => {
// Since we are resigning IDs based on index, ensure correct ordering
stepArray.sort((a, b) => a.id - b.id);
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't you want to use the order_index for this ?

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.

2 participants