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) »
  • Sort order for Individuals, Households, and Organizations
Pages: [1]

Author Topic: Sort order for Individuals, Households, and Organizations  (Read 5515 times)

GingerFeet

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 4
  • CiviCRM version: 3.4.6 / 3.4.7
  • CMS version: Drupal 6.22
  • MySQL version: 5.1
  • PHP version: 5.3.6
Sort order for Individuals, Households, and Organizations
April 29, 2010, 10:24:12 am
Our client has set up their data with households and individuals that are members of those households. Nice.

They want to do mailings to households (not members of households) in order to avoid duplicate postage to the same physical address. They also want to be able to easily maintain the quality of their mailing list. That means they need to have an alphabetical listing of households that makes sense.

Not:

Andrew Turtle & Melanie Lynche
Dr. & Mrs. Bill Smith
Drs. Jack Jones & Wendy Wallingford
Mr. & Mrs. Gene Abbot
Zelda Bottle & Alice Mains

But:

Abbot, Mr. & Mrs. Gene
Bottle, Zelda & Alice Mains
Jones, Drs. Jack & Wendy Wallingford
Smith, Dr. & Mrs. Bill
Turtle, Andrew & Melanie Lynche

And at the same time, they want the Communication preferences to be:
Dr. & Mrs. Bill Smith
not:
Smith, Dr. & Mrs. Bill.

Is this built in to CiviCRM? Where is it?

---------------------------

The first thought is to change the household name to Smith, Dr. & Mrs. Bill and to put the Dr. & Mrs. Bill Smith into the Nick name. Then change the address to use {contact.nick_name}. Clunky. Lameness. The Nick name should be a Nick name, not the Communication preference name.

Starting to look at the civicrm_contact table it appears that the individual has a Given Name field and a Surname field, and that CiviCRM automagically puts them into a Western European-centric sort_order of Surname, Given Name and display_name of Given Name Surname -- because that is easy to do. [As an aside, I have met Chinese people who want their name written with the Latin alphabet as Surname Given Name; not Surname, Given Name or Given Name Surname. But that is an aside.]

But the household is locked into the display_name = the sort_order, because it is obvious that it requires human intelligence to handle the problem of totally unpredictable naming conventions invented by random CiviCRM users. You can't just put the last name field in front, slam a comma and a space behind it, and drop the first name in behind that.

---------------------------

So why isn't there a field in the UI on the household edit page that allows human intelligence to determine the sort order of households that works well in their own organization? You know, so that the user edits the field and it saves that UI field directly into civicrm_contact.sort_order.

So that:
sort_order = the way the organization wants to sort household names (not the way CiviCRM forces the organization to sort household names)
display_name = the way the organization wants to address the household
nick_name = a nick name

---------------------------

Does anyone else care about this?

It will be crawling across broken glass for me to do this...

Is there someone out there that can do this easily?

jj

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: Sort order for Individuals, Households, and Organizations
April 29, 2010, 07:52:05 pm

1. in 3.2 the display_name and sort_name is configurable (thanx to jimmy huang from taiwan who helped us spec and code this out during the code sprint)

2. Your use case about exposing sort_name for households (and organizations) does make sense. The next step would be to submit code that implements this :) Please ping us on IRC if u'd like to work on this (or hire your local friendly developer to do the needful). Should be a relatively quick addition

thanx

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

GingerFeet

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 4
  • CiviCRM version: 3.4.6 / 3.4.7
  • CMS version: Drupal 6.22
  • MySQL version: 5.1
  • PHP version: 5.3.6
Re: Sort order for Individuals, Households, and Organizations
May 25, 2010, 12:47:38 pm
We are sponsoring Rohit Thakral of targetintegration.com to put this together.

Please assist Rohit in getting this change into the code base.

Thanks so much for all your great work!

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Sort order for Individuals, Households, and Organizations
May 26, 2010, 08:41:46 am
Hi guys,
my wishes below...I will be working on this in probably four weeks time? Does this help, do you need any assistance before?

Example:

Individual Jan van der Most

Ideally stored (and entered) as:
first name : Jan
middle name: van der  (compare to French “le” or Arabic “el” or German “von”)
last name: Most

Currently it can be entered this way, and will be stored in the database this way. However, sort name will become Most, Jan and I would like Most, Jan van der. This could be a localisation setting?


Houshold Meneer en Mevrouw Bergen-van der Elst (consisting of persons John Bergen and Alice Bergen-van der Elst

Ideally:
option list for prefix household (Mr. And Mrs. Etc.)
Input field where household name can be entered. I might actually for 1 or 2 customers create something here where they can pick the names of individuals linked to the household with a specific relationship (head of household springs to mind), and then the household name is made up from those names.

Sort name would in this case then become: Bergen-van der Elst.


Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Sort order for Individuals, Households, and Organizations
May 26, 2010, 02:13:29 pm
Seems to remember that in Tahoe they worked on that (in chinese the name is last+first without space in between if I recall the story)

Check with the other Erik or Piotr.

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

polestar

  • I post frequently
  • ***
  • Posts: 162
  • Karma: 11
    • Target Integration
Re: Sort order for Individuals, Households, and Organizations
May 28, 2010, 07:54:56 am
Erik,

How we discussed the other day, it will be a show/hide text box below the Organisation/Household Name and it will set the sort_name in the database. if left empty it will be set to default.

As it is a sponsored customisation, it will be implemented by the end of the day and will be submitted to Ginger Feet and CiviCRM.

Regards
Rohit
CiviCRM - Installation & Support | Virtual Private Servers (VPS) with Joomla/Drupal and CiviCRM | SugarCRM & vTiger CRM Installation and Support
Target Integration | www.targetintegration.com
Subscribe to Knowledgement - Your guide to effective business | http://www.knowledgement.ie

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Sort order for Individuals, Households, and Organizations
May 28, 2010, 08:10:24 am
All fine, I am glad this is happening...just wanted to share my wishes :-)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

GingerFeet

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 4
  • CiviCRM version: 3.4.6 / 3.4.7
  • CMS version: Drupal 6.22
  • MySQL version: 5.1
  • PHP version: 5.3.6
Re: Sort order for Individuals, Households, and Organizations
August 24, 2011, 03:10:48 pm
Hello All,

targetintegration.com has written some changes for us, and modified it several times over the past year.

The changes expose the 'Sort Name' field, so that it can easily be edited.
Earlier versions had a link that would then bring up the 'Sort Name' field, but our client (who is actually using this feature) felt that it was really important to have the field always visible (not requiring a click to see the contents).

So this version has it always visible.

This is the latest version that runs on 3.4.5

After people test it, can it be added to CiviCRM?

Thanks

gf

Well, I was going to attach the files, but a zip is not allowed. And it is six files, 2 more than the max allowed.

So how do I get the files to people who want to test it?

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: Sort order for Individuals, Households, and Organizations
August 24, 2011, 03:19:32 pm

can u attach it as a patch file?

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

Gorentz

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: WordPress
  • MySQL version: 5.5.21
  • PHP version: 5.3.10
Re: Sort order for Individuals, Households, and Organizations
April 16, 2013, 09:50:49 am
I take it this change never got added to the core CiviCRM?  (We're running 4.2.7)

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: Sort order for Individuals, Households, and Organizations
April 16, 2013, 09:53:17 am

I dont think this patch was submitted :(

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

BrightBold

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: Pantheon
  • PHP version: Pantheon
Re: Sort order for Individuals, Households, and Organizations
April 03, 2014, 06:40:16 pm
Isn't this the patch that was submitted in CRM-6333? It's marked Closed - Won't Fix. :(

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Sort order for Individuals, Households, and Organizations

This forum was archived on 2017-11-26.