'tagid' => array(
'name' => 'tag_id',
'title' => ts('Tag'),
+ 'type' => CRM_Utils_Type::T_INT,
'tag' => TRUE,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => $contactTags,
'gid' => array(
'name' => 'group_id',
'title' => ts('Group'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'group' => TRUE,
'options' => CRM_Core_PseudoConstant::nestedGroup(),
public function whereClause(&$field, $op, $value, $min, $max) {
$type = CRM_Utils_Type::typeToString(CRM_Utils_Array::value('type', $field));
+
+ // CRM-18010: Ensure type of each report filters
+ if (!$type) {
+ trigger_error('Type is not defined for field ' . $field['name'], E_USER_WARNING);
+ }
$clause = NULL;
switch ($op) {
),
'status_id' => array(
'title' => ts('Activity Status'),
+ 'type' => CRM_Utils_Type::T_STRING,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::activityStatus(),
),
),
'status_id' => array(
'title' => ts('Activity Status'),
+ 'type' => CRM_Utils_Type::T_STRING,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::activityStatus(),
),
'priority_id' => array(
'title' => ts('Priority'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id'),
),
'filters' => array(
'country_id' => array(
'title' => ts('Country'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::country(NULL, FALSE),
),
'state_province_id' => array(
'title' => ts('State/Province'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::stateProvince(),
),
'gid' => array(
'name' => 'group_id',
'title' => ts('Group'),
+ 'type' => CRM_Utils_Type::T_INT,
'group' => TRUE,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::staticGroup(),
'filters' => array(
'country_id' => array(
'title' => ts('Country'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::country(),
),
'state_province_id' => array(
'title' => ts('State/Province'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::stateProvince(),
),
),
'credit_accounting_code' => array(
'title' => ts('Financial Account Code - Credit'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialAccount(NULL, NULL, 'accounting_code', 'accounting_code'),
),
'debit_name' => array(
'title' => ts('Financial Account Name - Debit'),
+ 'type' => CRM_Utils_Type::T_STRING,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialAccount(),
'name' => 'id',
),
'credit_name' => array(
'title' => ts('Financial Account Name - Credit'),
+ 'type' => CRM_Utils_Type::T_STRING,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialAccount(),
),
'filters' => array(
'financial_type_id' => array(
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes(),
),
'filters' => array(
'payment_instrument_id' => array(
'title' => ts('Payment Method'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::paymentInstrument(),
),
),
'financial_type_id' => array(
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialType(),
),
),
'financial_type_id' => array(
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes(),
),
'id' => array(
'name' => 'id',
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes(),
),
),
'financial_type_id' => array(
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes(),
),
'filters' => array(
'sort_name' => array(
'title' => ts('Participant Name'),
+ 'type' => CRM_Utils_Type::T_STRING,
'operator' => 'like',
),
'id' => array(
'title' => ts('Contact ID'),
+ 'type' => CRM_Utils_Type::T_INT,
'no_display' => TRUE,
),
'birth_date' => array(
),
'contact_type' => array(
'title' => ts('Contact Type'),
+ 'type' => CRM_Utils_Type::T_STRING,
),
'contact_sub_type' => array(
'title' => ts('Contact Subtype'),
+ 'type' => CRM_Utils_Type::T_STRING,
),
'receive_date' => array(
'default' => 'this.year',
'financial_type_id' => array(
'name' => 'financial_type_id',
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes(),
),
'sid' => array(
'name' => 'status_id',
'title' => ts('Participant Status'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Event_PseudoConstant::participantStatus(NULL, NULL, 'label'),
),
'eid' => array(
'name' => 'event_type_id',
'title' => ts('Event Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_OptionGroup::values('event_type'),
),
),
'financial_type_id' => array(
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialType(),
),
),
'payment_instrument_id' => array(
'title' => ts('Payment Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::paymentInstrument(),
),
'price_field_value_id' => array(
'name' => 'price_field_value_id',
'title' => ts('Fee Level'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => $this->getPriceLevels(),
),
'filters' => array(
'bounce_reason' => array(
'title' => ts('Bounce Reason'),
+ 'type' => CRM_Utils_Type::T_STRING,
),
'time_stamp' => array(
'title' => ts('Bounce Date'),
'receive_date' => array('operatorType' => CRM_Report_Form::OP_DATE),
'financial_type_id' => array(
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialType(),
),
),
'payment_instrument_id' => array(
'title' => ts('Payment Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::paymentInstrument(),
),
'filters' => array(
'ordinality' => array(
'title' => ts('Contribution Ordinality'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => array(
0 => 'First by Contributor',
'tid' => array(
'name' => 'id',
'title' => ts('Membership Types'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Member_PseudoConstant::membershipType(),
),
),
'membership_type_id' => array(
'title' => ts('Membership Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Member_PseudoConstant::membershipType(),
),
'status_id' => array(
'title' => ts('Membership Status'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'label'),
),
'sid' => array(
'name' => 'status_id',
'title' => ts('Pledge Status'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_OptionGroup::values('contribution_status'),
),
'financial_type_id' => array(
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialType(),
),
),
'financial_type_id' => array(
'title' => ts('Financial Type'),
+ 'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialType(),
),
'gid' => array(
'name' => 'group_id',
'title' => ts('Group'),
+ 'type' => CRM_Utils_Type::T_INT,
'group' => TRUE,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::staticGroup(),