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 CiviCase (Moderator: Dave Greenberg) »
  • Deleting case types
Pages: 1 [2]

Author Topic: Deleting case types  (Read 5468 times)

david.a.king

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 3.4.5
  • CMS version: drupal 6.22
  • MySQL version: 5.2
  • PHP version: 5.3
Re: Deleting case types
September 01, 2011, 06:45:27 pm
am i safe to remove case types/deleted cases in the database (i.e. through phpmyadmin) or would this cause problems (with orphaned case activities and the like..)?


demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: Deleting case types
September 01, 2011, 07:30:25 pm
As a general rule if you are editing things in the database directly it means something is wrong, and so at that point the answer is always "no it's not safe". Having said that, doing it on a COPY of your database/installation is always safe, and a good way to see what the effects will be.

anothername

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 3
  • CiviCRM version: CiviCRM 4.2.6
  • CMS version: Drupal 7.19
  • MySQL version: 5.1.66-0+squeeze1-log
  • PHP version: 5.3.3-7+squeeze14
Re: Deleting case types
January 02, 2012, 02:01:01 pm
Still haven't figured this one out, but I am including a screen shot to help folks out visualize my problem!

In the image below, you see the demo site civicase type admin page. Below that, you see the civicase type admin page on my civi install. As you can see there is no 'delete' button and I can't figure out how to make it appear!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Deleting case types
January 03, 2012, 03:40:14 pm
Based on a quick review of the relevant code (see my prior post), looks like your case type option_value rows have somehow got the is_reserved flag set to 1 (true) OR they are showing up as "in use" based on the query:

Code: [Select]
SELECT DISTINCT( civicrm_case.case_type_id ) FROM civicrm_case
I think you'll need to do some debugging from your end to learn more.
Protect your investment in CiviCRM by  becoming a Member!

anothername

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 3
  • CiviCRM version: CiviCRM 4.2.6
  • CMS version: Drupal 7.19
  • MySQL version: 5.1.66-0+squeeze1-log
  • PHP version: 5.3.3-7+squeeze14
Re: Deleting case types
January 05, 2012, 11:27:23 am
Ok. Thanks Lobo, I will look deeper into it.

anothername

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 3
  • CiviCRM version: CiviCRM 4.2.6
  • CMS version: Drupal 7.19
  • MySQL version: 5.1.66-0+squeeze1-log
  • PHP version: 5.3.3-7+squeeze14
Re: Deleting case types
January 09, 2012, 12:15:33 pm
Sorry, I mean David!  ;)

circlebails

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
  • CiviCRM version: 4.1.X 4.2.X
  • CMS version: Drupal-6.X / Drupal-7.X
  • MySQL version: 5.1
  • PHP version: 5.2.16/17, 5.3
Re: Deleting case types
September 03, 2012, 03:34:11 am
One of our clients also has this problem. In their case they simply wish to delete all case types and cases. Bearing in mind that all deleted does is set is_deleted = '1', is it safe to simply truncate the civicrm_case table?

Ta

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: Deleting case types
September 03, 2012, 11:02:21 am

truncating the case table should not be an issue if the user does not care about any of the existing cases

i would use the UI to delete the unneeded case types

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 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • Deleting case types

This forum was archived on 2017-11-26.