Skip to content

Conversation

tbialcz
Copy link
Contributor

@tbialcz tbialcz commented Jun 30, 2025

🎫 Issue IBX-8753

Description:

This PR extends the ModifyFieldDefinitionFieldsSubscriber to support the following:

  • Applying field modifications conditionally based on a provided SpecificationInterface.
  • Keeping backward compatibility by accepting both string and string[] in the constructor.
  • Updated logic in onPreSetData to check the provided SpecificationInterface against the content type being edited.

For QA:

Documentation:

Copy link
Member

@adamwojs adamwojs left a comment

Choose a reason for hiding this comment

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

+1 but we need to improve code readability. I think we can start by splitting onPreSetData logic into several small private methods: https://gist.github.com/adamwojs/e1934ded9bceb3eb92d1f7b8f5c23fdc

@tbialcz tbialcz changed the title IBX-8753: Added ContentTypeIsCompany specification and improved ModifyFieldDefinitions logic IBX-8753: Improved ModifyFieldDefinitions logic Jul 2, 2025
@tbialcz tbialcz requested review from adamwojs and a team July 2, 2025 08:56
@ezrobot ezrobot requested review from mikadamczyk, Steveb-p, alongosz, ciastektk, ViniTou, barw4, wiewiurdp and konradoboza and removed request for a team July 2, 2025 08:57
Copy link

Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

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

We go away from relying on magic getters:

@tbialcz tbialcz requested a review from konradoboza August 25, 2025 07:55
Copy link

sonarqubecloud bot commented Sep 1, 2025

@pawlakadrian pawlakadrian self-requested a review September 2, 2025 10:08
Copy link

@pawlakadrian pawlakadrian left a comment

Choose a reason for hiding this comment

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

QA Approved on DXP Commerce 4.6.x-dev

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.

8 participants