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) »
  • CiviCase and Webform: Creator vs. Manager
Pages: [1]

Author Topic: CiviCase and Webform: Creator vs. Manager  (Read 639 times)

lolas

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
    • Freeform Solutions
  • CiviCRM version: Several
  • CMS version: Drupal
  • MySQL version: 5.1+
  • PHP version: Several
CiviCase and Webform: Creator vs. Manager
March 03, 2014, 03:47:58 pm
I am creating Civicrm cases via webform. The person submitting is to be the client. (also the creator)

I would like to assign all cases to a specific contact. In the activity/CiviCase tab I have selected Case manager role should be contact2.

I have added a contact2 to the webform and set this to a specific person via form widget "static" and "Set default contact from" = "specified contact".

I think that part is setup correctly but I see that the webform CiviCase is sending my specific contact (id=4) to the api as "creator_id".

I think that perhaps instead it should be doing a lookup on the manager role in the xml using the code below then using "addCaseRelationships" function to add the manager?

Looking up the manager role:
Code: [Select]
$xmlProcessor = new CRM_Case_XMLProcessor_Process();
$managerRoleId = $xmlProcessor->getCaseManagerRoleId($caseType);

In my xml I want to set it up this way because I don't want this role assigned to the creator (webform submitter) just to the manager:

Code: [Select]
   
   <RelationshipType>
        <name>Counselor</name>
        <manager>1</manager>
    </RelationshipType>

If I set it like this then my contact2 is completely ignored and the webform submitter becomes both the client and the manager.

Code: [Select]
   
   <RelationshipType>
        <name>Counselor</name>
        <creator>1</creator>
        <manager>1</manager>
    </RelationshipType>
Freeform Solutions provides technology and management consulting, website and database development, and managed internet hosting solutions for not-for-profit organizations (NFPs).

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: CiviCase and Webform: Creator vs. Manager
March 03, 2014, 05:07:50 pm
I don't have a lot of time to investigate this but a quick fix might be to always send in contact 1 as the creator, since that's the behavior we generally expect from a webform (contact 1 is always the creator of everything the webform creates).
Try asking your question on the new CiviCRM help site.

lolas

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
    • Freeform Solutions
  • CiviCRM version: Several
  • CMS version: Drupal
  • MySQL version: 5.1+
  • PHP version: Several
Re: CiviCase and Webform: Creator vs. Manager
March 04, 2014, 06:08:55 am
Thanks Coleman! I'll give that a try.
Freeform Solutions provides technology and management consulting, website and database development, and managed internet hosting solutions for not-for-profit organizations (NFPs).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • CiviCase and Webform: Creator vs. Manager

This forum was archived on 2017-11-26.