Skip to content

Conversation

@aparzi
Copy link
Contributor

@aparzi aparzi commented Oct 11, 2025

When the migration command was run for inputs, if the input had more than one reference in a method the migration would generate incorrect code

Fixes #63018

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #63018

What is the new behavior?

New code after migration:

public onSaveClick(): void {
     const model = this.model();
     
     model.requisitionId = 145;
     model.comment = 'value';
     model.status = 8;
     model.finilizeReasonId = 4
}

Does this PR introduce a breaking change?

  • Yes
  • No

@pullapprove pullapprove bot requested a review from crisbeto October 11, 2025 22:05
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Oct 11, 2025
@ngbot ngbot bot added this to the Backlog milestone Oct 11, 2025
Copy link
Member

@JeanMeche JeanMeche left a comment

Choose a reason for hiding this comment

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

Can you also make sure to rescope the commit message/PR.

This is a migration fix, not a core.

@aparzi aparzi requested a review from JeanMeche October 12, 2025 14:50
@aparzi
Copy link
Contributor Author

aparzi commented Oct 12, 2025

@JeanMeche I made the requested changes. Now the golden tests shouldn't fail, and I also rewrote some parts of the code.

@aparzi
Copy link
Contributor Author

aparzi commented Oct 12, 2025

Can you also make sure to rescope the commit message/PR.

This is a migration fix, not a core.

migration scope doesn't exist. What do I choice? I usually choice "core"

@JeanMeche
Copy link
Member

It's migrations actually.

@angular-robot angular-robot bot added the area: migrations Issues related to `ng update`/`ng generate` migrations label Oct 12, 2025
@aparzi aparzi changed the title fix(core): migrating input with more than 1 usage in a method fix(migrations): migrating input with more than 1 usage in a method Oct 12, 2025
@aparzi
Copy link
Contributor Author

aparzi commented Oct 12, 2025

It's migrations actually.

I updated also the PR title

@aparzi aparzi requested a review from JeanMeche October 12, 2025 15:41
@aparzi aparzi requested a review from JeanMeche October 12, 2025 16:29
@aparzi aparzi requested a review from JeanMeche October 13, 2025 08:28
When the migration command was run for inputs, if the input had more than one reference in a method the migration would generate incorrect code

Fixes angular#63018
@JeanMeche JeanMeche added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Oct 13, 2025
@JeanMeche JeanMeche removed the request for review from crisbeto October 13, 2025 15:31
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

AndrewKushnir pushed a commit that referenced this pull request Oct 13, 2025
…64367)

When the migration command was run for inputs, if the input had more than one reference in a method the migration would generate incorrect code

Fixes #63018

PR Close #64367
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime area: migrations Issues related to `ng update`/`ng generate` migrations target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strange behavior when migrating input with more than 1 usage in a method

3 participants