CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • New cron job to mark expired relationships as inactive
Pages: [1]

Author Topic: New cron job to mark expired relationships as inactive  (Read 1098 times)

torrance123

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 3
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.0.91
  • PHP version: 5.3.3
New cron job to mark expired relationships as inactive
October 10, 2012, 08:24:05 pm
At the moment, relationships that have an end date expire softly — there's no triggering of hook_civicrm_post() nor is the 'is_active' field on the relationship set to false.

There's a whole host of reasons why one might want to listen for expired events or being able to filter events that are expired/inactive using just the 'is_active' field (eg in Views).

Would adding a new cron that switches expired relationships to inactive (and fires appropriate hooks) be a good idea? Am happy to write the patch, but want to confirm this won't cause issues elsewhere.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: New cron job to mark expired relationships as inactive
October 10, 2012, 09:05:43 pm

yes, creating a scheduled job for this would be great. It also allows the site admin to determine if they want "expired" relationships to switch to inactive

go for it :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: New cron job to mark expired relationships as inactive
November 27, 2012, 05:47:31 pm
This is being added for 4.3 - http://issues.civicrm.org/jira/browse/CRM-11341
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • New cron job to mark expired relationships as inactive

This forum was archived on 2017-11-26.