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

Show labels of select, multiselect and boolean custom lead fields #8159

Open
wants to merge 9 commits into
base: staging
from

Conversation

@kuzmany
Copy link
Contributor

kuzmany commented Nov 27, 2019

Please be sure you are submitting this against the staging branch.

Q A
Bug fix?
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

We noticed lead profile display values of select, multiselect or boolean fields. But custom fields have labels to values and these labels are more human friendly. This PR normalize these values and allow display in friendly format.

Now

image

Expected

image

Steps to reproduce the bug:

  1. Create custom field select, multiselect and boolean (all with different labels / values)
  2. Create contact and set these fields
  3. Go to contact profile and see values there

Steps to test this PR:

  1. Load up this PR
  2. Repeat all steps
  3. See if works properly
@kuzmany kuzmany added this to the 2.16.0 milestone Nov 27, 2019
@kuzmany kuzmany changed the title Show labels select, multiselect and boolean custom lead fields Show labels of select, multiselect and boolean custom lead fields Nov 27, 2019
Copy link

florentpetitjean left a comment

Hello:

Here are the errors during tests :

  • If you create a boolean custom field you can't access to exisiting contact panel anymore (see image for the error message)

image

  • I can't create a new contact after I create a boolean custom field this error page show up during creation :

image

  • When you create a select or select multiple field with a default value, the value doesn't show in the contact panel, works for new contacts.

  • Contact creation is stuck on the panel page when you clic save & exit, the contact is created though.

Display in the contact panel works for select and multi select.
Works fine in forms too for those 2 fields.

kuzmany added 2 commits Nov 28, 2019
@kuzmany

This comment has been minimized.

Copy link
Contributor Author

kuzmany commented Nov 28, 2019

@florentpetitjean can you check now?

Copy link

florentpetitjean left a comment

Ok works almost perfectly now.
I just still got stuck on the contact creation page when I hit the save button (not sure it's link to this PR ?)

@kuzmany

This comment has been minimized.

Copy link
Contributor Author

kuzmany commented Nov 29, 2019

@florentpetitjean rewrited.
Please re-test all again.
Thanks

Copy link

florentpetitjean left a comment

Works fine now, thanks !

Copy link

florentpetitjean left a comment

Hello @kuzmany
We just discover that this PR prevent the API to work !
Can you look at it ?
Thanks

@kuzmany

This comment has been minimized.

Copy link
Contributor Author

kuzmany commented Dec 10, 2019

@florentpetitjean any details, error log...?

@florentpetitjean

This comment has been minimized.

Copy link

florentpetitjean commented Dec 10, 2019

we got a 500 error with API tester, no more infos for now.

@florentpetitjean

This comment has been minimized.

Copy link

florentpetitjean commented Dec 10, 2019

Here is the log !

[2019-12-10 15:53:43] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Argument 1 passed to Mautic\LeadBundle\Helper\CustomFieldValueHelper::normalizeValue() must be of the type array, integer given, called in /Users/audrey/Sites/Automation_dev/app/bundles/LeadBundle/Helper/CustomFieldValueHelper.php on line 38" at /Users/audrey/Sites/Automation_dev/app/bundles/LeadBundle/Helper/CustomFieldValueHelper.php line 57 {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Type error: Argument 1 passed to Mautic\LeadBundle\Helper\CustomFieldValueHelper::normalizeValue() must be of the type array, integer given, called in /Users/audrey/Sites/Automation_dev/app/bundles/LeadBundle/Helper/CustomFieldValueHelper.php on line 38 at /Users/audrey/Sites/Automation_dev/app/bundles/LeadBundle/Helper/CustomFieldValueHelper.php:57)"} []

@kuzmany

This comment has been minimized.

Copy link
Contributor Author

kuzmany commented Dec 10, 2019

@florentpetitjean What api call you test? Create or edit? I am working on it

@florentpetitjean

This comment has been minimized.

Copy link

florentpetitjean commented Dec 10, 2019

Just a Get contact send a 500 error

@kuzmany

This comment has been minimized.

Copy link
Contributor Author

kuzmany commented Dec 10, 2019

@florentpetitjean can you re-test now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.