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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • More options for relationships in advanced search?
Pages: [1]

Author Topic: More options for relationships in advanced search?  (Read 1510 times)

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
More options for relationships in advanced search?
April 13, 2013, 05:06:26 pm
In 4.3, the option to choose Start/end dates for relationships when doing an advanced search is a improvement, but for my use it doesn't go far enough. 

I regularly need to supply names and addresses of contacts who have a particular relationship that either started between two specified dates or that ended between two specified dates.

To do this easily I need two separate date selection options:
  • Start Date where I can set From and To dates
  • End date where I can set From and To dates.


I am a novice to code changes, but eager to learn.  Does this seem like something a novice could do and something that might be useful to others? 

I thought the existing advanced search code for relationships date selection and perhaps that for the Memberships date selections of Member since, Start date and End date might give me a good start.

If so, can someone point me to where I will find that?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: More options for relationships in advanced search?
April 13, 2013, 05:53:53 pm
Hi Joanne - I've forwarded this to Coleman Watts who has been doing a lot of great work improving the Advanced Search UI. I'm sure he'll have some thoughts / suggestions for you.
Protect your investment in CiviCRM by  becoming a Member!

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: More options for relationships in advanced search?
April 13, 2013, 08:28:24 pm
Two thoughts about this:

1) Having more exact control with a separate field for "start date" and "end date" would be useful for some searches.

2) Having it the way it is now might be more useful for most searches.

The way (I think) most organizations use relationship start-end dates is fairly imprecise, and CIvi encourages this - because start and end dates are optional, and "disabled" relationships are lumped together with those with a past end date. So this single date range search criteria sort of fudges it all together to give people the results (I think) they expect - "give me all relationships that happened during this timeframe" it will return all relationships that:
- Started during that timeframe but have no end date
- Ended during that timeframe but have no start date
- Started and ended during that timeframe

If you put your mind to it you could probably design something better, and the first steps don't involve any code. You just have to think through all the scenarios - both in terms of what type of data might be in the database, and what types of searches people would want to perform on it. Let us know what you come up with.
Try asking your question on the new CiviCRM help site.

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: More options for relationships in advanced search?
April 13, 2013, 09:17:58 pm

if the search is focussed specifically on relatonships, views and/or custom search might be an easier and quicker alternative

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • More options for relationships in advanced search?

This forum was archived on 2017-11-26.