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) »
  • Deleting shared addresses when deleting master
Pages: [1]

Author Topic: Deleting shared addresses when deleting master  (Read 377 times)

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Deleting shared addresses when deleting master
July 14, 2014, 10:30:42 am
I was looking at the implementation spec for address sharing (CRM-4572), and it says, "we don't want to automatically delete a linked address copy when it's master is deleted, but simply make it "independent and editable" by setting the master_id = NULL".

I recently had a discussion with a client about this - she made the argument that if you delete the master address, you SHOULD delete child addresses at the same time.  I couldn't think of a scenario wherein when you deleted the master address, you shouldn't simultaneously delete it from the sharers.  This seems akin to changing the master address - you want the change reflected everywhere.

Now that there's been some real-world use, is this something worth reopening as a discussion?  Is there a scenario in which the spec'ed behavior is desired over the behavior I suggest?

Jon

ps - I believe dgg wrote the spec, would love to get some feedback from him!
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Deleting shared addresses when deleting master
July 14, 2014, 11:18:22 am
Jon - This was implemented a while ago, but I recall discussion of some scenarios where it made sense not to delete shared address records (one was a household that was dissolving - e.g. divorce or ... - and some members are remaining in the physical location).

That said I'm sure there are situations where not deleting the shared addresses can cause (significant) extra work - e.g. a company/organization shutting down where you want to remove that shared work address from a bunch of employees.

I think a good improvement would be to ask the user whether they want to preserve the shared addresses independently or remove them.
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: Deleting shared addresses when deleting master
July 14, 2014, 11:48:33 am
In my own real-world use of this feature, I don't generally distinguish whose address is "master," I just think of the addresses as "shared." The master ends up being whichever contact I happen to not be editing at the moment (since that's how the Civi UI works), which strikes me as fairly arbitrary. So it would be equally arbitrary to delete a shared address automatically in one circumstance (deleting the "master") but not another circumstance (deleting the "shared").
So my vote would be to leave the functionality as-is.
Try asking your question on the new CiviCRM help site.

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Deleting shared addresses when deleting master
July 14, 2014, 01:52:58 pm
dgg, Coleman - thank you for your thoughtful responses!  I'm encouraging the person who originally spoke to me to chime in on this - it's not crazy to imagine my writing a simple extension that implements her preferred functionality.  I wanted to first make sure that it wasn't a change that should go into core.

Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Pam Flood

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: CiviCRM 4.4.5
  • CMS version: Drupal
  • MySQL version: Don't know
  • PHP version: Don't know
Re: Deleting shared addresses when deleting master
July 14, 2014, 04:32:44 pm
Hi everyone. Pam Flood here. Jon has been helping us out with getting our Civi up and running. We use the address sharing feature in 2 ways:

1) To share an organization's address with it's employees:
-If the address for the organization changes, we would want the address of all of the people sharing the organization's address (the employees) to change as well.
-If the address is no longer valid and we indicate that it is a bad address (using Location Type), we would want the Location Type of all of the people sharing the organization's address (the employees) to indicate that the address is bad.
-If the address is no longer valid and we want to delete it, we would want the address to be deleted from all of the people sharing this address (the employees).

2) For spouses:
-If the couple moves, and we change the address of the main contact, we would want the address of the spouse to change as well.
-If the address is no longer valid and we indicate that it is a bad address (using Location Type) on the main contact, we would want the Location Type of the spouse sharing the address to indicate that the address is bad.
-If the address is no longer valid and we want to delete it, we would want the address to be deleted from the spouse sharing this address.
-In the case of a divorce and we needed to change the address for one of the contacts and not the other, I would just do this manually.

Ideally, when changing or deleting an address (or indicating that it is a bad address), if we could choose whether or not to update the address of those who share it, that would be much appreciated. As it is, we have to go into each record that shares an address and individually delete it or indicate that it is a bad address. We have some organizations with 20 or more employees.

Thanks!

Pam

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Deleting shared addresses when deleting master

This forum was archived on 2017-11-26.