2

I'm looking to use CiviCRM to - in part - manage our team of around 50 volunteer translators. Once a volunteer has agreed to take on a translation, staff will set an activity, so that we can keep a record of how many translations people have done. I've set that up, with a number of custom fields for the volunteer contact, and for the activity (a URL of the original text, the date we should receive the translation, etc).

What I would like to be able to do but can't work out out the functionality of, is - once an activity has been assigned - for something in the volunteers contact sheet to display that they are currently translating (I can do this manually, but busy people probably won't necessarily always do two steps, so we could end up with activities being assigned but the translator still appearing "available"). This way when a staff person comes to search for a translator (by language to/from, and their availability) they only get shown volunteers who aren't currently completing activities.

Thanks!

  • How do you record when the person is finished translating, and who records that? – Demerit Oct 1 '18 at 17:11
  • The staff person will record it. My idea was they would switch the "available?" toggle back to "yes" in the individuals contact form. – Andrew Metheven Oct 1 '18 at 21:17
1

I think the best way to do this is with smart groups instead of custom fields. Create a smart group of folks who have a translation activity that's unfinished; create another smart group of everyone not in the first smart group.

  • Assume you mean using the Custom Search = Include/Exclude ie civicrm/contact/search/custom?csid=4&reset=1 – petednz - fuzion Jan 6 at 22:48
  • @petednz-fuzion My understanding is that Search Builder will now correctly handle this scenario, though I haven't tested recently. – Jon G - Megaphone Tech Jan 7 at 0:19
0

I don't know if it's possible to do this without at least a little custom code. I think in any case the completion status of a translation should be tied to its activity status field, i.e. if the activity status is Completed, then the translation is completed. Also the "available?" field on the contact would be a "view only" custom field not a manually updated field. After that, there's a couple choices:

  1. See if the CiviRules extension can do this. I haven't tried but the idea would be to create a trigger when the activity status is changed that updates the view-only custom field.

  2. Write an extension that does the same thing as #1. When an activity of type translation is saved:

    (a) If the activity status is Completed, set the view-only field to "yes" (i.e. person is available).

    (b) If not, set the view-only field to "no".

  3. Don't have a contact custom field, but write an extension that uses the hook_civicrm_summary that adds some output to the contact summary page:

    (a) If all activities of type translation have status Completed, display "Available".

    (b) Otherwise, display "Not Available".

In all options the staff member would only need to do one thing and that's update the activity status field to Completed when the translation is done.

As a more general extension that would include this functionality, I think an extension that could display something on the contact summary based on the combined state of the contact's various activities' fields would be quite useful. For example, instead of a contact custom field "Best PacMan score", you could have separate activities that record their scores for each game they played, and the extension would take the best one and display it on the contact summary. Just thinking out loud.

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.