- π¨π¦Canada joseph.olstad
patch 71 works well! Thanks.
Lendude responded with a 'I'm not overly thrilled' and a 'hmm, not sure'.
I'm sure that this is needed because I was going to write myself my own plugin for this but it seems like views should provide this option. Alternatively for adding new fields I have to iterate through all nodes and save them with the new field data, OR insert rows directly into tables, neither of which is convenient. It makes sense to allow null values to be considered as false for exposed filters.
What's remaining to do for this to get accepted and committed?
- Status changed to Needs work
over 1 year ago 3:39pm 23 February 2023 - π³π±Netherlands Lendude Amsterdam
Well most importantly, we need a patch that strips out the scope creep that got spun off into π Add 'Is empty (NULL)' and 'Is not empty (NOT NULL)' operators to boolean field filtering Needs work (and looking at the feedback there that was a good idea).
Once we have a slimmed down patch, let's see what is left of the nits and if we have enough test coverage for what is left.
Still not sold on this being the right fix for this problem, but people seem to want this, so Β―\_(γ)_/Β―
The only reason I was for this since the boolean filter already had logic for this and it seemed easy to just expose that logic. This being Views, of course it wasn't easy.....This is a bandaid solution for a bigger problem, to me, https://www.drupal.org/project/field_defaults β is the right solution for now.
See my reasoning/rant in π Boolean field filtering does not work when no values are set Closed: duplicate . - π¨π¦Canada blanca.esqueda
patch 71 works, ty!
We had exactly this case:
It makes sense to allow null values to be considered as false for exposed filters. Imagine the scenario, you add a new boolean field to a node and want to be able to filter on it. Rather than save every node and mess up metadata the above core patch does the job cleanly. - π¨π¦Canada blanca.esqueda
This was another solution:
https://drupal.stackexchange.com/questions/288232/filter-on-boolean-with... - πΊπΈUnited States uri_frazier Portland, Oregon
The patch works, but causes an unexpected change to the
admin/content
view (see screenshot).
- First commit to issue fork.
- last update
over 1 year ago Build Successful - @codebymikey opened merge request.
- last update
over 1 year ago Build Successful - Status changed to Needs review
over 1 year ago 12:17pm 14 July 2023 - last update
over 1 year ago Build Successful Rerolled the patch for 10.0.x, and created an issue fork for it as well.
- Status changed to Needs work
over 1 year ago 1:59pm 14 July 2023 - πΊπΈUnited States smustgrave
Have not yet reviewed but MR caused some failures.
Also MR should be updated for 11.x please.
Have not reviewed or tested yet.
- πΊπ¦Ukraine Stockticker
In case someone needs a patch against a 10.1.x version of the Drupal Core.
- last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago Custom Commands Failed - π¬π§United Kingdom pobster
Y'all broke my unit tests! This corrects that the Views filter schema was updated but not the sort schema.
- Status changed to Needs review
10 months ago 9:29pm 19 January 2024 - last update
10 months ago Custom Commands Failed - last update
10 months ago Custom Commands Failed - Status changed to Needs work
10 months ago 10:08pm 19 January 2024 The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- π¦πΊAustralia jannakha Brisbane!
patch doesn't apply to D10.3
+1 for D10.3 - π¦πΊAustralia jannakha Brisbane!
Patch #90 works on 10.3
Filter config:
SQL query without patch:
AND ("node__field_part_product"."field_part_product_value" = '0'))
SQL query with patch:
AND (("node__field_part_product"."field_part_product_value" = '0') OR ("node__field_part_product"."field_part_product_value" IS NULL)))
what has to be done to push this issue further?
it's a long term issue and still hasn't been committed to core! - Status changed to Needs review
3 months ago 6:34am 30 August 2024 - π¦πΊAustralia jannakha Brisbane!
@flyke - can you please create an issue fork with your fix for D10.3?
to get this RTBC from core team these things are required:
- fix for D11 (as this issue's version is 11.x-dev)
- add tests - Status changed to Needs work
3 months ago 12:24pm 30 August 2024