mautic / mautic

Mautic: Open Source Marketing Automation Software.
https://www.mautic.org
Other
7.36k stars 2.63k forks source link

"Field order" should display only fields for the same object when creating a Custom Field #14181

Open andersonjeccel opened 1 month ago

andersonjeccel commented 1 month ago

Mautic Series

5.1.x series

Mautic installed version

5.x branch

Way of installing

I cloned the Mautic repo (not recommended or supported)

PHP version

Not relevant

What browsers are you seeing the problem on?

Chrome

What happened?

When creating a new custom field, no matter which object you select (contact or company), all fields for all objects keep visible for selection in "Field order". "Field order" is responsible for placing the new custom field you're creating above the chosen.

Example: Now I'm creating "X Place", but I already have "Beautiful input" created previously. If "Field order" is set to "Beautiful input", my new field will appear above the selected one.

I might be creating "X Place" for the object Company, but "Beautiful input" (created for Contacts), is still visible. Selecting it will do absolutely nothing.

To fix this issue, we need the "Field order" options to become updated with the relevant options depending on the value selected for "Object".

How can we reproduce this issue?

  1. Open Custom Fields
  2. Create New
  3. Set Object to Contact
  4. Click on the "Field order" field and see that all fields are displayed
  5. Now set Object to Company
  6. See an incredible amount of 0 changes, all fields are still there

Relevant log output

No response

Code of Conduct



Care about this issue? Want to get it resolved sooner? If you are a member of Mautic, you can add some funds to the Bounties Project so that the person who completes this task can claim those funds once it is merged by a member of the core team! Read the docs here.

laurielim commented 1 week ago

I can work on this issue and #14180

laurielim commented 1 day ago

To clarify, https://github.com/mautic/mautic/pull/14242 should also fix this issue.