Details

    • Type: Sub-task
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: HR-1.2
    • Fix Version/s: HR-1.2
    • Component/s: Absence
    • Labels:
      None
    • Sprint:
      Sprint 1, Sprint 12b

      Description

      (This should be written as a patch for CiviCRM 4.4. It's an offshoot of HR-238.)

      As a bit of background, note the main call-path for Activity.get API is:

      civicrm_api3_activity_get(...)
      => _civicrm_api3_basic_get(...)
      => _civicrm_api3_dao_set_filter(...)

      For implementing the target_contact_id filter, one idea discussed tonight with Eileen on IRC:

      • Modify _civicrm_api3_dao_set_filter() to call $dao->setApiFilter($params)
      • Add CRM_Core_DAO::setApiFilter($params) – which does nothing
      • Add CRM_Activity_BAO_Activity:setApiFilter($params) – which checks for $params['target_contact_id'] and calls $this->joinAdd() and $this->whereAdd()
      • Add unit-tests to core for cases with (a) no matching activities, (b) a matching activity where the target_contact_id is the only target contact, (c) a matching activity with additional (irrelevant) target contacts.
      • Make sure the unit-test api_v3_ActivityGetAbsencesTest::testGetTarget() passes

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nileema.jadhav Nileema Jadhav
                Reporter:
                timotten Tim Otten
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 1 hour
                  2d 1h