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) »
  • Why is this the total or relationships/groups display in the tab name ?
Pages: [1]

Author Topic: Why is this the total or relationships/groups display in the tab name ?  (Read 1313 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Why is this the total or relationships/groups display in the tab name ?
June 28, 2010, 06:23:24 am
Hi,

Wouldn't it be better to display the number of active groups/relationship instead of counting  the inactive ones as well ? What was the logic behind putting them all ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Why is this the total or relationships/groups display in the tab name ?
June 28, 2010, 07:09:04 am
xavier :
Quote
Wouldn't it be better to display the number of active groups/relationship instead of counting  the inactive ones as well ?

Good point :)
Wanna provide a patch for the same.

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Why is this the total or relationships/groups display in the tab name ?
August 09, 2010, 03:36:46 pm
Done for total of membership/group and relationship (only count the active ones).

Where should I push it ? on the 3.2 branch ?

As an aside, the code and query to get the list of membership and group are fairly optimised, but for the relationship it's basically the same code and requests that get the lists of active/inactive, plus a count.

I am not able to code the sql to fetch it, but if you or someone understanding the schema of relationship can write one that returns the number of active relationship for a given contact, I would think it would be a worthwhile optimisation, as it's called everytime a contact is displayed.

If you find the sql, can wrap it in a method, as done already for groups and membership

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: Why is this the total or relationships/groups display in the tab name ?
August 09, 2010, 06:08:39 pm

please file an issue and attach the patch. we'll take a look at it for 3.2.2 / 3.3 release depending on the complexity of the patch

please do link to this forum post so someone patching it can write the needed code for relationships

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

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Why is this the total or relationships/groups display in the tab name ?
August 09, 2010, 08:00:43 pm
http://issues.civicrm.org/jira/browse/CRM-6627
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Why is this the total or relationships/groups display in the tab name ?

This forum was archived on 2017-11-26.