Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16909

"Find Pledges" search filters on "status" are not working

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.5
    • Fix Version/s: 4.6.6
    • Component/s: CiviPledge
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      I have reproduced this in the demo at: http://d46.demo.civicrm.org/

      There is an error when choosing just one or many checkbox filters for "Pledge Status" There is also an error when choosing many checkbox filters for "Pledge Payment Status"

      To reproduce:
      1) Click "Contributions ... Find Pledges"

      2) Click any single (or multiple) checkbox for "Pledge Status". (I chose 'completed')

      Now you will see the following error:
      Sorry but we are not able to provide this at the moment.
      (1) is not of the type Integer

      Stack trace:
      backTrace

      #0 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(359): CRM_Core_Error::backtrace()
      #1 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Utils/Type.php(262): CRM_Core_Error::fatal("(1) is not of the type Integer")
      #2 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(5187): CRM_Utils_Type::escape("(1)", "Integer")
      #3 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Pledge/BAO/Query.php(307): CRM_Contact_BAO_Query::buildClause("civicrm_pledge.status_id", "IN", "(1)", "Integer")
      #4 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Pledge/BAO/Query.php(217): CRM_Pledge_BAO_Query::whereClauseSingle((Array:5), Object(CRM_Contact_BAO_Query))
      #5 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Component.php(298): CRM_Pledge_BAO_Query::where(Object(CRM_Contact_BAO_Query))
      #6 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(1894): CRM_Core_Component::alterQuery(Object(CRM_Contact_BAO_Query), "where")
      #7 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(499): CRM_Contact_BAO_Query->whereClause()
      #8 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(461): CRM_Contact_BAO_Query->initialize()
      #9 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Pledge/Selector/Search.php(169): CRM_Contact_BAO_Query->__construct((Array:3), NULL, NULL, FALSE, FALSE, 512)
      #10 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Pledge/Form/Search.php(254): CRM_Pledge_Selector_Search->__construct((Array:3), 1, NULL, FALSE, NULL, "search")
      #11 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(345): CRM_Pledge_Form_Search->postProcess()
      #12 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php(75): CRM_Core_Form->mainProcess()
      #13 /home/centrals/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Pledge_Form_Search), "refresh")
      #14 /home/centrals/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Pledge_Form_Search), "refresh")
      #15 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("refresh")
      #16 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:3), NULL)
      #17 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:14))
      #18 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
      #19 /home/centrals/public_html/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
      #20 [internal function](): civicrm_invoke("pledge", "search")
      #21 /home/centrals/public_html/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:2))
      #22 /home/centrals/public_html/index.php(21): menu_execute_active_handler()
      #23

      {main}




      To reproduce the second issue:

      1) Click "Contributions ... Find Pledges"

      2) Choose multiple checkboxes for "Pledge Payment Status" ( I choose 'Completed' and 'Pending' )

      You will see the error: Sorry but we are not able to provide this at the moment.
      (1,2) is not of the type Integer

      Stack trace:
      #0 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(359): CRM_Core_Error::backtrace()
      #1 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Utils/Type.php(262): CRM_Core_Error::fatal("(1,2) is not of the type Integer")
      #2 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(5187): CRM_Utils_Type::escape("(1,2)", "Integer")
      #3 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Pledge/BAO/Query.php(349): CRM_Contact_BAO_Query::buildClause("civicrm_pledge_payment.status_id", "IN", "(1,2)", "Integer")
      #4 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Pledge/BAO/Query.php(217): CRM_Pledge_BAO_Query::whereClauseSingle((Array:5), Object(CRM_Contact_BAO_Query))
      #5 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Component.php(298): CRM_Pledge_BAO_Query::where(Object(CRM_Contact_BAO_Query))
      #6 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(1894): CRM_Core_Component::alterQuery(Object(CRM_Contact_BAO_Query), "where")
      #7 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(499): CRM_Contact_BAO_Query->whereClause()
      #8 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(461): CRM_Contact_BAO_Query->initialize()
      #9 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Pledge/Selector/Search.php(169): CRM_Contact_BAO_Query->__construct((Array:3), NULL, NULL, FALSE, FALSE, 512)
      #10 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Pledge/Form/Search.php(254): CRM_Pledge_Selector_Search->__construct((Array:3), 1, NULL, FALSE, NULL, "search")
      #11 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(345): CRM_Pledge_Form_Search->postProcess()
      #12 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php(75): CRM_Core_Form->mainProcess()
      #13 /home/centrals/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Pledge_Form_Search), "refresh")
      #14 /home/centrals/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Pledge_Form_Search), "refresh")
      #15 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("refresh")
      #16 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:3), NULL)
      #17 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:14))
      #18 /home/centrals/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
      #19 /home/centrals/public_html/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
      #20 [internal function](): civicrm_invoke("pledge", "search")
      #21 /home/centrals/public_html/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:2))
      #22 /home/centrals/public_html/index.php(21): menu_execute_active_handler()
      #23 {main}

        Attachments

          Activity

            People

            • Assignee:
              rohan1990 Rohan Ramesh Katkar
              Reporter:
              sgladstone Sarah Gladstone
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: