Scheduled Disable expired relationships has run succesfully according to the date/time I see in the Scheduled job table. I see a relationship in the disabled relationship section that has an End date older than today, so that seems to work. What I don't understand is that it is still marked "Enabled" in view and edit.

Also when I do an api call on the relationship mentioned before it returns it as an active relationship even though it is expired:

$result = civicrm_api3('Relationship', 'get', array(
  'sequential' => 1,
  'is_active' => 1,
  'id' => 56276,


    "is_error": 0,
    "version": 3,
    "count": 1,
    "id": 56276,
    "values": [
            "id": "56276",
            "contact_id_a": "24943",
            "contact_id_b": "20992",
            "relationship_type_id": "14",
            "start_date": "1995-01-01",
            "end_date": "2004-01-01",
            "is_active": "1",
            "description": "Support Branch",
            "is_permission_a_b": "0",
            "is_permission_b_a": "0",
            "custom_24": "Res",
            "custom_71": {
                "S": "S"
            "custom_71_26513": {
                "S": "S"
            "custom_24_26513": "Res"

How should I understand this? As a bug or a feature? What does the "Enabled" tick box in fact mean? Should I understand it as separate from the start and end date as kind of "override" function?

CiviCRM version is 4.6.27. In case it was a bug, has it been fixed meanwhile?


The "Disable expired relationships" scheduled job should set the is_active field to 0 for relationships with a past end date.

A bit of history: Civi has always treated both past and disabled relationships as "inactive" however there were inconsistencies in some of the code (reports maybe) that were not doing so. I believe Fuzion contributed the scheduled job to remedy this

(From a comment on issue CRM-18561. See also this forum post for some discussion.)

So it looks to me as though the scheduled job has failed in this case. If you view the job log for this job, are any errors shown? Or anything at the relevant time in the CiviCRM log file in files/civicrm/ConfigAndLog/ ?

Could you test whether the problem occurs on the 4.6 demo site?

  • The demo sites have functioning Cron jobs? – ñull Sep 13 '17 at 17:59
  • You can go to Administer -> System Settings -> Scheduled Jobs and click more -> Execute Now. – davejenx Sep 14 '17 at 9:37
  • False alarm. This works as expected on the demo site and I discovered it works correctly as well on our production site. It was apparently a glitch in this particular instance of the site on my local staging server. Thank you for helping out! – ñull Oct 9 '17 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.