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) »
  • max instances in civicase config ignored?
Pages: [1]

Author Topic: max instances in civicase config ignored?  (Read 622 times)

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
max instances in civicase config ignored?
July 15, 2013, 09:01:53 am
I think there's a name/label mismatch. It works if your name and label happen to be the same, but if not then max instances gets ignored when attempting to create a new activity and there's already the max number of that activity type on the case.

I can confirm it happens on both a 3.3 install and a 4.2 install. Can't check demo because the sample config doesn't have any max_instances beside open case.

In CRM_Activity_Form_Activity::preprocess() it properly gets the name and puts it in _activityTypeName, but then lower down it overwrites that by calling CRM_Core_BAO_OptionValue::getActivityTypeDetails() which returns the label. Seems like just changing that would fix this but might break other stuff. Could set another variable and then use that for the actual check against max_instances in CRM_Case_Form_Activity, but first wondering if I'm the only one seeing this problem?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • max instances in civicase config ignored?

This forum was archived on 2017-11-26.