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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How to search for contacts with currently active relationships
Pages: [1]

Author Topic: How to search for contacts with currently active relationships  (Read 613 times)

daveatkins

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
  • CiviCRM version: 4.1.6
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.41
  • PHP version: 5.2.10
How to search for contacts with currently active relationships
March 12, 2013, 07:49:44 am
In advanced search, it is possible to search for contacts with active relationships. However, the search results include contacts with active, but expired relationships. How can I make the search limited to contacts with relationships where the end date is greater than today?

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: How to search for contacts with currently active relationships
March 12, 2013, 08:53:08 am

There was a proposal some time back to make expired relationships inactive

Not sure what happened to that proposal, you might want to try searching on the forums for it. I think peted might have been leading the charge on that one

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

daveatkins

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
  • CiviCRM version: 4.1.6
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.41
  • PHP version: 5.2.10
Re: How to search for contacts with currently active relationships
March 12, 2013, 09:45:23 am
The way the relationships work is confusing to say the least. We were attempting to determine what our practice should be when an individual leaves an organization and we concluded that the correct practice was to enter an end date but leave the relationship active because we understood the concept to be that technically, the relationship is still active, but now it is "bounded" by the additional, optional information. This shows up on the relationships tab:

Inactive Relationships
These relationships are Disabled OR have a past End Date.

The problem is this conditional logic is not consistently applied.

It appears that "disabled" is more of a temporary measure. You might "disable" an employment relationship while a person is on maternity leave? That does not actually make sense to me; I cannot see any use for this status. Either the relationship is true or not and the idea of disabling it temporarily must depend on some other function driven by an end use: we don't want these people to show up in some report, so we disabled them. OK, but what about the many records where the relationship is "active" but there is an end date? I want the history.

I don't know what the design solution here is, but it seems the end date needs to be exposed in search.

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: How to search for contacts with currently active relationships
March 12, 2013, 10:10:18 am

Start and end dates are exposed in the advanced search in 4.3

Would be good for you to explore that and take it for a test drive on our sandbox servers

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: How to search for contacts with currently active relationships
March 12, 2013, 11:25:01 am
Is this helpful to this discussion - http://issues.civicrm.org/jira/browse/CRM-11341 - a new cron job that will disable all expired relationships
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

daveatkins

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
  • CiviCRM version: 4.1.6
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.41
  • PHP version: 5.2.10
Re: How to search for contacts with currently active relationships
March 13, 2013, 09:04:28 am
thanks...the cron job might be what we need. I need to think about what other implications are...it may be that this is the most logically consistent thing to be doing

as for version 4.3, we just upgraded to the latest Drupal6 supported version and it was a pain. No desire to go through a Civi upgrade again any time soon.

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: How to search for contacts with currently active relationships
March 13, 2013, 09:12:54 am

Curious as to what the pain points were during the upgrade process?

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

daveatkins

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
  • CiviCRM version: 4.1.6
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.41
  • PHP version: 5.2.10
Re: How to search for contacts with currently active relationships
March 14, 2013, 08:11:42 am
one minor pain point was that custom templates did not work as expected because the $userRecordUrl variable is now only available to civi administrators. That was my fault and lack of testing as a non-administrative user.

bigger pain was due to the other post I have going on here on this forum
http://forum.civicrm.org/index.php/topic,28019.0.html
...the OG sync between Civi and Drupal. We have a lot of code that creates civi groups based on whether the Drupal user is in certain organic groups. We had a number of batch scripts created to keep this working and of course they broke after the upgrade.

These are the problems that "bubbled up" to me--I'm not the developer who did all the work, but these customization points are where we had the most trouble.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How to search for contacts with currently active relationships

This forum was archived on 2017-11-26.