#1935300-33: Don't hardwire Database in Views filters, add regexp to DBTNG In this issue it breaks the execution query() when you execute $this->{$info[$this->operator]['method']}($field); as the correct method is opRegex and not op_regex.

Comments

yongt9412 created an issue. See original summary.

johnchque’s picture

Status: Active » Needs review
StatusFileSize
new578 bytes

Changed the name for using the correct method. Patch added.

berdir’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

This needs a test then.

johnchque’s picture

Tests added, Test only patch should fail. Interdiff added.

berdir’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

Tests look good to me, trivial fix.

dawehner’s picture

Looks perfect for me!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Nice to see this tested!

Committed 67b7cbc and pushed to 8.0.x and 8.1.x. Thanks!

  • alexpott committed 5f7cb31 on 8.1.x
    Issue #2650964 by yongt9412: Fix the execution of regular expression
    

  • alexpott committed 67b7cbc on
    Issue #2650964 by yongt9412: Fix the execution of regular expression
    
    (...

  • xjm committed 831b404 on 8.1.x
    Revert "Issue #2650964 by yongt9412: Fix the execution of regular...

  • xjm committed f37e884 on
    Revert "Issue #2650964 by yongt9412: Fix the execution of regular...
xjm’s picture

Status: Fixed » Needs work

This appears to have caused a postgres regression:
https://www.drupal.org/pift-ci-job/152768
Edit: Well, maybe not a regression so much as not being fixed on postgres by the patch. :) But we need to not introduce a fail in the test suite.

Whenever we have a patch that affects DB queries, we should run the patch against all environments before commit. This can be done with the "Add test" link.

berdir’s picture

Yeah, I don't think this actually *introduced* a regression. More likely, it just exposes an existing one?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • alexpott committed 5f7cb31 on 8.3.x
    Issue #2650964 by yongt9412: Fix the execution of regular expression
    
  • xjm committed 831b404 on 8.3.x
    Revert "Issue #2650964 by yongt9412: Fix the execution of regular...

  • alexpott committed 5f7cb31 on 8.3.x
    Issue #2650964 by yongt9412: Fix the execution of regular expression
    
  • xjm committed 831b404 on 8.3.x
    Revert "Issue #2650964 by yongt9412: Fix the execution of regular...

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • alexpott committed 5f7cb31 on 8.4.x
    Issue #2650964 by yongt9412: Fix the execution of regular expression
    
  • xjm committed 831b404 on 8.4.x
    Revert "Issue #2650964 by yongt9412: Fix the execution of regular...

  • alexpott committed 5f7cb31 on 8.4.x
    Issue #2650964 by yongt9412: Fix the execution of regular expression
    
  • xjm committed 831b404 on 8.4.x
    Revert "Issue #2650964 by yongt9412: Fix the execution of regular...
gambry’s picture

Status: Needs work » Closed (duplicate)

I'm closing this one as duplicates of #2821112: Views NumericFilter 'regular_expression' operator is broken, which has some additional fixes and - IMHO - a cleaner test.
Feel free to swap the two, however issues are postponed until #2845543: PostgreSQL regular expression match operators works only for text is merged.