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) »
  • CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted
Pages: [1]

Author Topic: CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted  (Read 2261 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted
February 02, 2010, 10:37:11 am
CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted. So when it's called in CRM_Case_XMLProcessor_Process::createActivity (the only place in the codebase that calls it AFAICG*) to check if max_instances of the activity type already exist, it counts activities regardless of is_deleted so skips activity creation if there are enough deleted activities.

* As Far As I Can Grep

Is this the intended behaviour?

Dave

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted
February 02, 2010, 01:36:36 pm
I don't think so - sounds like a bug. Can you file an issue with a patch for 3.1.2 or 3.1.3.

UPDATE: Dave D is going to take a quick look at this as well tomorrow just to verify that it's a bug.
« Last Edit: February 02, 2010, 02:07:58 pm by Dave Greenberg »
Protect your investment in CiviCRM by  becoming a Member!

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: CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted
February 03, 2010, 02:36:22 pm
Confirmed as a bug. It asks you if you want to edit the existing one and then following that link gives an error.

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted
February 05, 2010, 10:41:26 am
Filed http://issues.civicrm.org/jira/browse/CRM-5782 .

Also CRM_Case_BAO_Case::retrieveCaseIdsByContactId doesn't check is_deleted, should it? This function doesn't seem to be used in the current codebase.

Dave J

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted
February 05, 2010, 05:50:18 pm
Yeah - I can't find any references to it either. I asked Yash to double check when she does the other fix.
Protect your investment in CiviCRM by  becoming a Member!

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted
February 08, 2010, 02:26:57 am
My vote is for keeping retrieveCaseIdsByContactId even if it isn't used in the current codebase, because given that AFAIK there are no API functions for cases, this is a really useful function. I'm currently using it in a hook. I'd rather have this function, even if it does return deleted cases, than lose it; I just wanted to clarify the intended behaviour.

Thanks,

Dave J

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted
February 08, 2010, 08:10:33 am
Ok cool - I've updated the issue as follows:

"Also, update CRM_Case_BAO_Case::retrieveCaseIdsByContactId to NOT return is_deleted cases by default by adding a $includeDeleted = false parameter (which allows caller to also get deleted cases if needed)."
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • CRM_Case_XMLProcessor_Process::isActivityPresent doesn't check is_deleted

This forum was archived on 2017-11-26.