private function filterAndAddNoneValueIds(Tracker_CrossSearch_SharedField $shared_field, array $value_ids) { $not_none_value_ids = array(); foreach ($value_ids as $value_id) { if ($value_id == self::VALUE_NONE) { $shared_field->addValueId($value_id); } else { $not_none_value_ids[] = $value_id; } } return $not_none_value_ids; }
protected function getSharedFieldFragment($fragment_number, Tracker_CrossSearch_SharedField $shared_field) { $field_ids = $this->da->quoteSmartImplode(',', $shared_field->getFieldIds()); $value_ids = $this->da->quoteSmartImplode(',', $shared_field->getValueIds()); // Table aliases $changeset_value = "CV_{$fragment_number}"; $changeset_value_list = "CVL_{$fragment_number}"; $sql_fragment = "\n INNER JOIN tracker_changeset_value AS {$changeset_value} ON (\n {$changeset_value}.changeset_id = c.id\n AND {$changeset_value}.field_id IN ({$field_ids})\n )\n INNER JOIN tracker_changeset_value_list AS {$changeset_value_list} ON (\n {$changeset_value_list}.changeset_value_id = {$changeset_value}.id\n AND {$changeset_value_list}.bindvalue_id IN ({$value_ids})\n )\n "; return $sql_fragment; }