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) »
  • Oops, deleted all contacts (usability question)
Pages: [1]

Author Topic: Oops, deleted all contacts (usability question)  (Read 2756 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Oops, deleted all contacts (usability question)
November 27, 2009, 03:04:24 am
Hi,

A customer of mine wanted to delete some contacts, but somehow instead of mass deleting the selected ones, checked all the contacts, and hence deleted them all, as the said "yes" to the confirmation message, without realising that the number was way higher than what was expected.

Beside the long term proper UI improvement (never ask confirm when you mean undo), it might be good to display the confirmation message differently (eg with the font size function of the number of contacts, or in bold if more than 100) ? ie make the difference between the regular windows message you confirm without thinking and the real confirmation as is are you really really sure ?

Or add a second confirm (js) if > 500 ?

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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Oops, deleted all contacts (usability question)
November 27, 2009, 09:05:06 am
Hi Xavier - If you think something simple like increasing font size or using a "warning" font color would help, you can submit a small patch to do that. The ability to restrict "delete" via permissioning in 3.0+ seems like it should help with this. Most relevant though... we are finalizing sponsored 3.2 CiviCase enhancements with the folks at Physicians Health and one of the high priority items is implementing a configurable option to apply "is_deleted" flag to contacts on delete action rather than physically deleting the contact and it's related records. Contacts marked "deleted" can subsequently be viewed and un-deleted by users with appropriate permission.

The "CiviCase Phase 3 queue" is still under review - but you can take a look here:

http://wiki.civicrm.org/confluence/display/CRM/CiviCase+-+Phase+3+Candidates
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Oops, deleted all contacts (usability question)
November 27, 2009, 01:48:39 pm
Hi Dave,

Looked at the code templates/CRM/Contact/Form/Task/Delete.tpl

{$totalSelectedContacts} is easy to use. However the image is hard coded:

<img src="{$config->resourceBase}i/Inform.gif"

I'd like to add a .info .warning and .error classes in the css and put the right images (haven't found warning image, but got error and Info. So it can be use to style coherently everywhere

What do you think ?

Otherwise, I'd go for:
1) no icon if 1
2) an info if <25 (ie. you have selected and did a mass action)
3) a warning if <100 (ie. you might have deleted "select all", are you sure you didn't want to cherry pick)
4) an error if >100 (ie. seriously, dude ?) Shall I add a message that it might take a long time and even timeout ?

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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Oops, deleted all contacts (usability question)
November 27, 2009, 04:04:42 pm
I think creating / implementing css classes for .info, .warning and .error makes sense. Actually .inform-icon and .tip-icon are already defined (see lines 1965-1967 in civicrm.css (latest commit since I move stuff around slightly after checking what was there).

You should be able to use the triangle with exclamation point (maybe in yellow color) for warning, and the circle with 'x' inside in red for error.

The different sprite files have the different colors - e.g for red:
.red-icon {background-image:url("../packages/jquery/themes/smoothness/images/ui-icons_cd0a0a_256x240.png")}

For the specific Delete situation I would recommend just 2 levels along with making sure that the number of contacts to be deleted is displayed very clearly:
1) If >= 1 and <= 25 : .info-icon class
2) If > 25 : .warning-icon class

I would not use an error class here, since we are only providing "info" or a "warning". We should reserve "error" class for an actual error condition.
Protect your investment in CiviCRM by  becoming a Member!

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Re: Oops, deleted all contacts (usability question)
November 28, 2009, 05:27:31 am
Hi Dave,
The is_deleted option would be very welcomed in my organisation.
Currently we have implemented a kind of similar procedure by creating a custom field "is_active".
In our setup nobody (except me  8)) can delete data. You can only set something to INACTIVE. The contact will then considered not being in the database.
The delete ACL in 3.x helps a lot, but additionally I have adapted the templates where nessecary to hide all delete options.
I thinks accidents like the one Xavier's is reporting, will always happen. Increasing the visibility of the warning helps, but only a little.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Oops, deleted all contacts (usability question)
November 30, 2009, 12:43:45 pm
Ok, that's different between 3.0 and 3.1 took me a while to understand why I didn't see the sprite.

Will check how to backport the sprite and mix it that way.

X+
-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) »
  • Oops, deleted all contacts (usability question)

This forum was archived on 2017-11-26.