Hello,

I want to improve the way that joins with conditions are processed. This stems from a burning desire to conditionally join a table based on a date. Not a timestamp, but a date which comes from the Date module. Which means I need to preprocess the field.

You'll notice in the views_join documentation that there is no processing for a formula condition. So no DATE_FORMAT and no STR_TO_DATE.

I think the whole reason we have this is due to #645990: Fix handling of 'extra' conditions and left/inner joins, which was written in 2009, and there may not have been formulas back the. I'd like to add to it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nagiek’s picture

Status: Active » Needs review
FileSize
5.53 KB

Patch attached

nagiek’s picture

Also, the changes in this patch should be applied to views_join_subquery as well

tim.plunkett’s picture

Status: Needs review » Needs work
+++ b/includes/handlers.incundefined
@@ -1523,55 +1523,73 @@ class views_join {
+              // We have our own placeholders, so we won't use those from views

Missing full stop.

Also, CNW for #2.