Files: 
CommentFileSizeAuthor
#11 views-rename_op_longer-2003566-11.patch1.03 KBbroeker
PASSED: [[SimpleTest]]: [MySQL] 55,875 pass(es). View
#8 views-rename_op_longer-2003566-8.patch1.02 KBbroeker
PASSED: [[SimpleTest]]: [MySQL] 56,047 pass(es). View
#5 views-rename_op_longer-2003566-5.patch1.02 KBbroeker
PASSED: [[SimpleTest]]: [MySQL] 55,722 pass(es). View
#2 rename_op_longer-2003566-2.patch1.02 KBbroeker
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git]. View

Comments

broeker’s picture

Assigned: Unassigned » broeker

working on it

broeker’s picture

Status: Active » Needs review
FileSize
1.02 KB
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git]. View

Status: Needs review » Needs work

The last submitted patch, rename_op_longer-2003566-2.patch, failed testing.

zschmid’s picture

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/String.phpundefined
@@ -326,7 +326,7 @@ function op_shorter($field) {
+  function addLongerThan($field) {
     $placeholder = $this->placeholder();
     $this->query->add_where_expression($this->options['group'], "LENGTH($field) > $placeholder", array($placeholder => $this->value));

I believe the addLongerThan function should be public

broeker’s picture

Status: Needs work » Needs review
FileSize
1.02 KB
PASSED: [[SimpleTest]]: [MySQL] 55,722 pass(es). View

Added public to addLongerThan function

heddn’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

In #2003582: Rename Views method op_equal() to opEqual() it was decided to not rename a function from op_whatever to addWhatever. So to be consistent this patch should just change the name to opLongerThan - i'm okay with adding the Than here as this is what it does.

broeker’s picture

Status: Needs work » Needs review
FileSize
1.02 KB
PASSED: [[SimpleTest]]: [MySQL] 56,047 pass(es). View

Changed op_longer to opLongerThan per comment in #7 . . .

heddn’s picture

Title: Rename Views method op_longer() to addLongerThan() » Rename Views method op_longer() to opLongerThan()

Fixing title

dawehner’s picture

Status: Needs review » Needs work

Thanks for your work.
Method should be protected

broeker’s picture

Status: Needs work » Needs review
FileSize
1.03 KB
PASSED: [[SimpleTest]]: [MySQL] 55,875 pass(es). View

I was unclear whether this should be a public or protected function but per dawehner I've now changed it to a protected method:

-  function op_longer($field) {
+  protected function opLongerThan($field) {
     $placeholder = $this->placeholder();
     $this->query->add_where_expression($this->options['group'], "LENGTH($field) > $placeholder", array($placeholder => $this->value));
   }
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Perfect

webchick’s picture

Title: Rename Views method op_longer() to opLongerThan() » Change notice: Rename Views method op_longer() to opLongerThan()
Project: Drupal core » Views
Version: 8.x-dev » 8.x-3.x-dev
Component: views.module » Code
Status: Reviewed & tested by the community » Active
Issue tags: +Needs change record

Committed and pushed to 8.x. Thanks!

Moving to Views for the change notice.

xjm’s picture

Title: Change notice: Rename Views method op_longer() to opLongerThan() » Rename Views method op_longer() to opLongerThan()
Project: Views » Drupal core
Version: 8.x-3.x-dev » 8.x-dev
Component: Code » views.module
Assigned: broeker » Unassigned
Status: Active » Fixed
Issue tags: -Needs change record

Automatically closed -- issue fixed for 2 weeks with no activity.