We often have batches of six to eight related cases which have much of the same content (relationships, custom fields, activities). I would like to generate new cases by cloning an existing case multiple times. Before I embark on writing a new extension, has anyone already done something like this?

  • 1
    I dont really understand your question. You can create a case types which preloads a bunch of activities and roles (relationships). Is that waht you mean? – Jaap Jansma - CiviCooP May 3 '18 at 20:28
  • Thanks. Yes, we use case types extensively. These give you the structure for a new case, and a standardised set of activities, but it's essentially an empty case, ready for data entry. What I want to do is clone a case, complete with all the data (roles data, custom field contents, activities). The obvious solution is an extension which creates a new empty case and then copies all the data from the source case to the new case, but I would need to hard-code the copying function for each different case type. I was hoping that there might be a better (ie more generic) way? – Jern May 4 '18 at 7:54
  • I would say have a look at the solution ErikH has mentioned. – Jaap Jansma - CiviCooP May 7 '18 at 18:37

Another alternative might be to use the CiviRules extension, and develop your own action that prepopulates cases upon creation?

Check for https://civicrm.org/extensions/civirules the extension and https://docs.civicrm.org/civirules/en/latest/create-your-own-introduction/ for documentation on developing your own actions.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.