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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • CiviCase views integration - case type field
Pages: [1]

Author Topic: CiviCase views integration - case type field  (Read 1460 times)

hawasha

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
CiviCase views integration - case type field
March 19, 2013, 05:48:21 am
I am trying to write some basic views integration for CiviCase. I am struggling to implement the Case Type field using civicrm_handler_field_pseudo_constant. It looks to me as though this is because the case_type_id field in civicrm_case table is implemented as a varchar(128) rather than an int(10) FK. Does anyone know why this might be?

hawasha

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
Re: CiviCase views integration - case type field
March 19, 2013, 06:08:43 am
I have been discussing this on IRC and it seems that possibly this field has been implemented as a varchar to allow multiple values. However, the CiviCase Case Type field does not allow multiple selections, and it seems unlikely that a Case would need to belong to multiple Case Types. 

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: CiviCase views integration - case type field
March 19, 2013, 08:38:15 am
The original spec called for multivalued case types. But in practice usually what you have is a primary single-valued case type, and then a secondary case type(s) field which is multi-valued, and which may or may not affect the prepopulation of activity sets.

There is no built-in feature for the secondary case type(s), and the multivaluedness of the primary one is just left over from the original spec.

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: CiviCase views integration - case type field
March 19, 2013, 08:59:14 am

If its just an artifact and the core code does not respect multiple values, should we switch and make it a uni-value element?

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

hawasha

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
Re: CiviCase views integration - case type field
March 19, 2013, 10:32:30 am
That would certainly make my life easier if there is no reason not to.

Alice

bazhob

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: Drupal
  • MySQL version: 5.1.68-cll
  • PHP version: 5.3.21
Re: CiviCase views integration - case type field
June 18, 2013, 12:03:13 pm
Dear hawasha, for some reason I did not see this thread before, probably I didn't check with the right search terms.

That's why I wrote a patch for CiviCase / Views integration myself, and ran into the same problem. I solved the issue above with a quick hack, which still needs improvement.
http://issues.civicrm.org/jira/browse/CRM-12853

Did you publish your solution as well?

All the best. Tobias

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • CiviCase views integration - case type field

This forum was archived on 2017-11-26.