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) »
  • Can I add new activities to an existing Case Type?
Pages: [1]

Author Topic: Can I add new activities to an existing Case Type?  (Read 1678 times)

marc

  • Guest
Can I add new activities to an existing Case Type?
December 03, 2009, 12:59:00 pm
Hi,

I have just added a case type called "Event", but forgot to include an activity. So I went back to change the Event.xml file, then deleted the Event case type and recreated it. And yet, it refuses to show the new activity. I copied the Event.xml to Test.xml and created a new case type Test, which does have the new activity.

Specifically, why is this happening and more generally, how can I add activities/roles etc to a case type later on? Or is that not really supported right now?

Thanks,

Marc

marc

  • Guest
Re: Can I add new activities to an existing Case Type?
December 03, 2009, 01:13:11 pm
Hi again,

I just tried out a couple more things and realised that I cannot add activities that have component "Core" rather than "CiviCase".

Before enabling CiviCase, I had an activity called "Task". I added this in the *.xml file and I can create a case without getting any fatal errors, but I cannot add this activity later on.

Did I mess up somewhere, or is it indeed not possible to use these "Core" activities for a CiviCase?

Marc

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Can I add new activities to an existing Case Type?
December 04, 2009, 04:43:32 pm
Marc - Not sure what's going on with your tests. I just tried adding a new 'Core' activity type called Task to my 3.0 install and then added it to the sample .xml configuration file for Housing Support case type (HousingSupport.xml), at the end of the <ActivityTypes> section. When I went to an existing Housing Support case and looked at the "New Activity" dropdown - the Task activity was there. I added a 'Task' and that activity showed up in the Case Activities grid below as expected.

Snippet from modified HousingSupport.xml:
Code: [Select]
    <ActivityType>
      <name>Change Case Start Date</name>
    </ActivityType>
    <ActivityType>
      <name>Task</name>
    </ActivityType>
  </ActivityTypes>

In general, there shouldn't be a problem defining additional activities or case roles in the case type .xml files.

One thing to watch for is that string match between the Activity Types in the database and the ActivityType name in the xml file is done on the 'name' column in civicrm_option_value (rather than the label column). If your activity type has special characters or spaces, the name will be different from the label (which also may be a translated value). This seems less likely to be the problem given your single word activity type label ('Task') - but would be worth checking along with obvious stuff like editing the wrong copy of the .xml file etc. Activity types are stored in civicrm_option_value table:

SELECT * from civicrm_option_value where option_group_id =2
Protect your investment in CiviCRM by  becoming a Member!

marc

  • Guest
Re: Can I add new activities to an existing Case Type?
December 08, 2009, 01:40:36 am
Hi Dave,

you are right, it actually worked this time round. The reason it didn't work before was that the name column for the existing activity "Task" was set to NULL, so there was nothing to match. I don't know why this is, because when I create new activities now - of whatever kind - they have the column set. Maybe it is because we only recently upgraded to civicrm 3.0?

In any case, thanks for the help,

Marc

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • Can I add new activities to an existing Case Type?

This forum was archived on 2017-11-26.