Problem/Motivation

Add a boolean field as a filter and expose it. The widget title and default label will be 'True'.

Proposed resolution

Fix the views data generated to include a 'label' property too. Ideally we would use either title or 'title short' but some handlers still depend on label, so we should keep that for 8.x.x at least? :/

Remaining tasks

User interface changes

Fixed widget labels

API changes

Data model changes

Comments

damiankloip created an issue. See original summary.

damiankloip’s picture

Issue summary: View changes
damiankloip’s picture

Title: Boolean exposed filter value widget just show 'True' label » Boolean exposed filter value widget just shows 'True' label
Status: Active » Needs review
StatusFileSize
new1.74 KB
damiankloip’s picture

StatusFileSize
new1.68 KB

With a correct patch.

The last submitted patch, 3: 2732091.patch, failed testing.

dawehner’s picture

Some kind of test would be nice!

damiankloip’s picture

damiankloip’s picture

StatusFileSize
new956 bytes
new2.61 KB

We can add something to the existing UI test as this has the same problem already.

The last submitted patch, 8: 2732091-8-test-only-FAIL.patch, failed testing.

jibran’s picture

Status: Needs review » Reviewed & tested by the community

Uber nit pick. Other then that RTBC.

+++ b/core/modules/views/src/Plugin/ViewsHandlerManager.php
@@ -86,7 +86,7 @@ public function getHandler($item, $override = NULL) {
+      foreach (array('group', 'title', 'title short', 'label', 'help', 'real field', 'real table', 'entity type', 'entity field') as $key) {

This line is annoyingly long. Can we move it to some var and make it multiline?

  • catch committed a03a23b on 8.2.x
    Issue #2732091 by damiankloip: Boolean exposed filter value widget just...
catch’s picture

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

Committed/pushed to 8.2.x, thanks!

Any reason this can't go into 8.1.x?

dawehner’s picture

Nope

catch’s picture

Status: Reviewed & tested by the community » Fixed

Yeah I also can't think of one. Cherry-picked to 8.1.x

  • catch committed d745549 on 8.1.x
    Issue #2732091 by damiankloip: Boolean exposed filter value widget just...

Status: Fixed » Closed (fixed)

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