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

Fix(designer): Adding an action in V3 could create a duplicate named action resulting in data loss. #4721

Merged

Conversation

AfroJoe759
Copy link
Contributor

@AfroJoe759 AfroJoe759 commented Apr 26, 2024

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Bug Fix

  • What is the current behavior? (You can also link to an open issue here)

    • In short, if you were to create an action (example Scope) and change its name to a name that will be autogenerated (Scope 1) and then add another action of the same type, it will generate an action of the same name (Scope 1) instead of a unique one.

    • If the actions are in the same "branch" then an error will be thrown on save catching the duplicate names and informing the user the flow wasn't saved because of this. If you have the actions in parallel branches, then the flow will save successfully, but when the user reloads the flow one of the actions will override the other resulting in data loss for that action and potentially its children.

    • Link to bug: https://msazure.visualstudio.com/One/_workitems/edit/27685791/

  • What is the new behavior (if this is a feature change)?

    • This PR adds a check to see if the user has renamed any actions within the session and if it has, it will generate a flow name that isn't a duplicate. This fixes the bug as in the scenario where both actions are in the same branch, the flow will save successfully since the names are unique. And in the scenario where the actions were in parallel branches, because the names are different the flow will save successfully without data loss.
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    N/A

  • Please Include Screenshots or Videos of the intended change:

Save Time (Current Behavior)
image

Flow Reload (Current Behavior)
image

Save Time (Bug Fix)
image

Flow Reload (Bug Fix)
image

@Eric-B-Wu Eric-B-Wu merged commit 730d34a into Azure:main Apr 26, 2024
12 checks passed
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.

None yet

2 participants