Skip to content
Snippets Groups Projects
Commit bffc031a authored by jurgenhaas's avatar jurgenhaas
Browse files

Add patch to smart_date

parent 64721df2
No related branches found
Tags v1.1.0
1 merge request!320Merging develop into main
Pipeline #1324547 passed
......@@ -189,6 +189,9 @@
"drupal/simple_oauth": {
"#3257293 Non-registered claims error": "https://www.drupal.org/files/issues/2023-08-11/comment-27.diff"
},
"drupal/smart_date": {
"#3478471 Filter contains partly": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3478471.diff"
},
"drupal/smart_login": {
"#2831386 Error 403 redirect": "https://www.drupal.org/files/issues/this_is_silently-2831386-2.patch",
"#2709529 Redirect after login": "https://www.drupal.org/files/issues/redirect_to_page_of-2709529-2.patch",
......
diff --git a/src/Plugin/views/filter/Date.php b/src/Plugin/views/filter/Date.php
index 63ee9a22883f65523b0cf20fead66e65ed1e250c..891c4fee97864715c89b53c24e5d96203aef054f 100644
--- a/src/Plugin/views/filter/Date.php
+++ b/src/Plugin/views/filter/Date.php
@@ -106,6 +106,12 @@ class Date extends CoreDate implements ContainerFactoryPluginInterface {
'short' => $this->t('contains'),
'values' => 1,
],
+ 'daterange_contains_partly' => [
+ 'title' => $this->t('Contains partly'),
+ 'method' => 'opContains',
+ 'short' => $this->t('contains partly'),
+ 'values' => 1,
+ ],
'daterange_not_contains' => [
'title' => $this->t('Does not contain'),
'method' => 'opContains',
@@ -245,6 +251,10 @@ class Date extends CoreDate implements ContainerFactoryPluginInterface {
$this->query->addWhereExpression($this->options['group'], "$field <= $min_value AND $field_end >= $max_value");
break;
+ case 'daterange_contains_partly':
+ $this->query->addWhereExpression($this->options['group'], "$field <= $max_value AND $field_end >= $min_value");
+ break;
+
case 'daterange_not_contains':
$this->query->addWhereExpression($this->options['group'], "$field >= $max_value OR $field_end <= $min_value");
break;
......@@ -185,6 +185,9 @@
"drupal/simple_oauth": {
"#3257293 Non-registered claims error": "https://www.drupal.org/files/issues/2023-08-11/comment-27.diff"
},
"drupal/smart_date": {
"#3478471 Filter contains partly": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3478471.diff"
},
"drupal/smart_login": {
"#2831386 Error 403 redirect": "https://www.drupal.org/files/issues/this_is_silently-2831386-2.patch",
"#2709529 Redirect after login": "https://www.drupal.org/files/issues/redirect_to_page_of-2709529-2.patch",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment