1

This forum link where it was born seems to suggest that it's needed as a replacement for hooks or to be able to filter them in drupal views. But it seems you can make a view that filters based on end dates in the past, and there are hooks for relationships (maybe there weren't at the time of the original post).

An alternate way of asking this question is "what does is_active mean for relationships"? Is it just a stand-in instead of using effective-dating queries such as are common in PeopleSoft or HR systems (which have broader use, e.g. list all the people who were active employees in 2019)? Is it just a redundant data field that means "end date in the past"?

Besides trying to understand whether it's redundant and maybe a bit fragile, one reason I'm asking is that anyone who's using this scheduled job would be dependent on the fact that civi ends relationships when it does, and so a change to that would affect this. So another way of asking this question is "Is anybody using this scheduled job and can describe your use case a little bit?"

2 Answers 2

1

End date alone does not determine if the relationship is 'active' or not. It will remain active until the scheduled job kicks in and makes it inactive. Examples include inherited memberships (membership by relationship). If you look in the advanced search you can see a radio option for active/inactive relationships. Its important to note anything in Civi that is using relationships to work out if it should carry out the action will most likely look for active relationships.enter image description here

3
  • Ok thanks we're getting there but I'm still not clear though why that type of search can't just look directly at the end date instead of needing another field and a cron job. Why can't end date alone determine if it's active or not? Farther down that page is Active Period, which is more flexible and covers the same ground without needing the extra redundant field and cron. Inherited memberships I don't know how they're currently implemented but why wouldn't they also be able to just look directly at end date?
    – Demerit
    Aug 18, 2020 at 19:09
  • I'm not disagreeing with your rationale, simply highlighting user cases. For example, its not always possible to know the dates i.e. I know someone used to work somewhere but I don't know when hey left etc. Therefore relationships cant always be attributed time elements. Aug 19, 2020 at 17:46
  • Ok thanks I'm willing to mark it answered just still not completely convinced :)
    – Demerit
    Aug 19, 2020 at 19:02
0

(apologies if i am missing some deeper levels to this question)

if a Relationships passes its End Date then the job sets it to be not is_active

is_active is a setting you can use to disable a Relationship that may not have an End Date

8
  • is_active is a setting you can use to disable a Relationship that may not have an End Date - what does that mean in real life?
    – Demerit
    Aug 18, 2020 at 0:18
  • I create a relationship. I do not know the end date for it. at some point i want to 'end' it, but i don't bother entering an 'end date' I just set the relationship to disabled. By contrast, I create a relationship that ends on Dec 31, so on Dec 31 i need a job to come along and change the Relationship from Active to Disabled
    – petednz - fuzion
    Aug 18, 2020 at 4:54
  • I'm still not getting it. Is there a real world example of the first one? Why not just enter "today"? And for the second one why do you need the job? What does is_active=0 add that looking at the end date doesn't?
    – Demerit
    Aug 18, 2020 at 12:27
  • Yes, lets say there is an election in your local area and that election means the person who is voted will hold the position for 2 years. So you would setup the relationship for two years in advance (ending say 31-Dec-2022). On the 1st of Jan 2023 the relationship will still show active unless you have the scheduled job which works out if relationships have ended and therefore makes them inactive. Hope that helps! Aug 18, 2020 at 14:17
  • Hmm still not getting it. It has an end date - where is it showing as still active when you look on Jan 1 2023?
    – Demerit
    Aug 18, 2020 at 15:54

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.