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) »
  • Case status Closed is hard-coded, consider allowing multiple closed states
Pages: [1]

Author Topic: Case status Closed is hard-coded, consider allowing multiple closed states  (Read 2908 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Case status Closed is hard-coded, consider allowing multiple closed states
December 15, 2009, 08:35:34 am
Hi,

Use case:
Case = application where multiple end states are possible, e.g. rejected at stage 1 or 2, accepted.

Discussed with Lobo on IRC:

<davej_> case_status: I see that state 'Closed' is handled specially in code (CRM_Case_BAO_Case::getCases) - would be nice if there could be multiple 'Closed' states, e.g. Application Granted/Refused.
<dlobo> good suggestion
<dlobo> wanna post on the forum
<davej_> dlobo: will do.
<dlobo> we should generalize that and allow multiple statuses to have the "closed" property
<dlobo> we can potentially do that in 3.2
<davej_> All the out-of-the-box case_status & encounter_medium options have reserved = 1, so I'm wary of meddling with them but need a different set of options.
<davej_> No UI for these 2 option groups at the mo, but I can live without that.
<dlobo> i think there is a generic UI for all option groups
<dlobo> just no links have been exposed...
<dlobo> so something like: http://trunk/civicrm/admin/options/activity_type?group=case_status&reset=1
<dlobo> fix the url for your situation :)
<davej_> Ah, great, that works. I manually disabled Closed in db & got SQL error in getCases due to no closedId. UI sensibly disallows disabling reserved options.

Case status 'Closed' and 'Urgent' are hard-coded by name in CRM_Case_BAO_Case::getCases.

Case status 'Ongoing' is hard-coded by id (1) in CRM_Case_Form_Activity::setDefaultValues, rather than looking up by is_default.

Dave J
« Last Edit: December 15, 2009, 09:17:31 am by davej »

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Case status Closed is hard-coded, consider allowing multiple closed states
February 17, 2010, 02:51:58 pm
+1 to allowing additional case closed options
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Case status Closed is hard-coded, consider allowing multiple closed states
April 09, 2010, 11:49:22 am
This would really enhance a project that I'm working on.
Lead Developer, C3 Design.
Twitter: @FatherShawn

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: Case status Closed is hard-coded, consider allowing multiple closed states
April 09, 2010, 03:30:29 pm

Would be great for someone to step up and help sponsor / contribute code to make this happen

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

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Case status Closed is hard-coded, consider allowing multiple closed states
April 10, 2010, 04:10:57 am
Extending this feature would logically involve fixing this possible bug.  I'm willing to have a crack at it.  Feels small enough to possible and involved enough to push me a bit.  8)
Lead Developer, C3 Design.
Twitter: @FatherShawn

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • Case status Closed is hard-coded, consider allowing multiple closed states

This forum was archived on 2017-11-26.