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 segment filters without object #6946

Merged
merged 1 commit into from Jan 14, 2019

Conversation

Projects
5 participants
@kuzmany
Copy link
Contributor

kuzmany commented Dec 1, 2018

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:

Segments created at 2016 after upgrade to 2.14.2 has empty operators in filter list.

image

I noticed, these filters hasn't object . After this fix works properly

image

@Maxell92 as author of #5755 do you see any another idea? This is mine filters DB json

image

Steps to reproduce the bug:

Steps to test this PR:

  1. Load up this PR

List deprecations along with the new alternative:

List backwards compatibility breaks:

@kuzmany kuzmany added the Bug label Dec 1, 2018

@kuzmany kuzmany added this to the 2.15.1 milestone Dec 1, 2018

@Maxell92

This comment has been minimized.

Copy link
Contributor

Maxell92 commented Dec 1, 2018

Hi @kuzmany, I am not able to simulate this error.

But the code is good, although there is a code in a crate responsible for this - https://github.com/mautic/mautic/blob/staging/app/bundles/LeadBundle/Segment/ContactSegmentFilterCrate.php#L68

@npracht npracht modified the milestone: 2.15.1 Dec 3, 2018

@heathdutton heathdutton added this to Code Review (2 required) in Mautic 2 Dec 6, 2018

@npracht npracht moved this from Code Review (2 required) to Ready to Test (first time) in Mautic 2 Jan 3, 2019

@alanhartless alanhartless added this to Needs Testing in 2.15.1 Jan 14, 2019

@alanhartless alanhartless merged commit 6f9544e into mautic:staging Jan 14, 2019

2 checks passed

Scrutinizer Analysis: No new issues – Tests: passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Mautic 2 automation moved this from Ready to Test (first time) to Merged Jan 14, 2019

@alanhartless alanhartless moved this from Needs Testing to Merged in 2.15.1 Jan 15, 2019

@mleffler

This comment has been minimized.

Copy link
Contributor

mleffler commented Jan 16, 2019

This has been code reviewed and has had one test pass, and is running in our production environment.

kuzmany added a commit to kuzmany/mautic that referenced this pull request Jan 24, 2019

alanhartless added a commit that referenced this pull request Jan 29, 2019

Merge pull request #7168 from kuzmany/revert-fix-segments-filter-with…
…out-object

Revert #6946 (Fix segment filters without object)

maxlawton added a commit to MauldinEconomics/mautic that referenced this pull request Feb 5, 2019

Merge branch 'staging' into new_filters
* staging: (1926 commits)
  Fixed date and use statement placement
  Add a tab with devices
  Fix PHP notice
  Revert code
  Revert mautic#6946
  Fix Organization key
  Reordered widgets according to feedback from PR.
  Removed some widgets from dashboard. We don't need to display all the widgets we have. Users can adjust widgets count according to their preferences later.
  Revert filterTrait
  Add check to prevent BR inside IMG
  Remove rowIfExists
  Fix notices from not set vars
  Revert new feature with ingore tokens depemnds on configurations
  Revert "Bigint unsigned ids"
  Fixed bad merge
  Update messages.ini
  Prevent BC break by cleaning display
  Filtering out sensitive information from SQL error message
  Improve segment event date filters
  Revert fix-segments-filter-without-object
  Revert "unset subscribed_channels If showcontatfrequency slot doesn't exist"
  Revert "Notice fix"
  unset subscribed_channels If showcontatfrequency slot doesn't exist
  Temporary fix
  Notice fix
  Add LeadEventLog to params list for config object
  Remove empty spaces
  Skip international validation if phone number is empty
  Fix SQL query
  Increase to PHP 7.2
  Check for empty response value while opening modal (bugfix)
  Add possibility to use @template annotations in controllers (for Twig templates)
  Use empty function instead of comparison
  Fix email preview with generated lead
  Keep code quote consistent
  Fix php-cs-fixer error
  Add check for auth key
  Add company mapping and api key for ExtremeIpLookup
  Fix non outlook conditions and comments
  Respect default_timezone from configuration during segment rebuild
  Catch exceptions during thumbnail preview to avoid 500 if the image is not valid
  Do not forward but render the template
  API must provide the filters in the same format as widget forms does
  Fixed the empty vs === null bug and improved readability with the ArrayHelper
  New ArrayHelper that will help to make code more readable
  Check that the contact exists before checking locale
  Check that a file is not empty before calling methods on that object
  Decide better what fields should search for unique values
  Lead::id cannot be retyped to int as that will break some code that compares it as === null
  Ensure the right field object is used when querying for unique values
  resolving conflicts
  Extract lookup activation to a small function so the rest of the code can use it independently
  Convert array to string to avoid PHP notice if the value is an array
  Company is a contact field, not a company field
  Add columns from the group by clause to the comparison as well
  Fix for artificial report columns used in the order by clause
  Change UTM tags URL column form VARCHAR(255) to LONGTEXT as it can be a lot longer
  Set company to contact from IP details only if not set on the contact
  Add combined index for email_stats on is_read and date_sent
  $cm prop is not inherited from the parent as it's private. Get it first.
  Use BIGINT UNSIGNED column type for stat table ID columns
  Transliterate the page title also in the URL query
  Fixing badly named variable
  Resolving conflicts
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.