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 Activity :: Duration
Pages: [1]

Author Topic: CiviCase Activity :: Duration  (Read 1926 times)

peta

  • Guest
CiviCase Activity :: Duration
June 09, 2009, 08:03:20 pm
Hello
It looks like Civicase only records activities in terms of time. 

What if there is an activity measured in terms of units  eg Transport: Number of trips or Meals: Number of meals.  ??

We also need value: eg Home Modification - cost $.

I've had a look at a few files and I might be able to get around this reasonably easily (ie without major hack)

In civicrm/templates/CRM/Case/Form/Activity.tpl there is this code:

1.  for the "Duration" label:  {$form.duration.label}

Question:  Where is {$form.duration.label} set?


In the database table "civicrm_activity", duration is an int(10).

2. I am hoping not to have to do this one:  change the field type.  The reason would be to allow entry of decimals.
I can possibly convince the client to round up all dollar amounts (?).

Question: What might be the implications of changing the field type?

Related Question: What validation code exists which would stop entry of decimals into the duration text box on the Activity form.

Any comments appreciated.
Thank you
Peta


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCase Activity :: Duration
June 10, 2009, 10:14:21 am
I would consider handling these activity properties as custom fields which extend particular activity types. This is the intended model for configuring input and data storage for all the various types of activities that cases can encompass.

If you want to suppress the Duration field as well for some / all activities - then you could accomplish this with a customized version of the template file - and avoid hacking core code and schema.
Protect your investment in CiviCRM by  becoming a Member!

peta

  • Guest
Re: CiviCase Activity :: Duration
June 14, 2009, 04:44:39 am
Hi Dave

Thank you. I am going to try this out.

I was hoping to store the 'measurement' of each Activity in one field (as it will be either minutes, units or cost) - easier for the reports that the client needs to generate.

However most Activities are measured in minutes so it may work out all right to use custom fields.

Peta

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • CiviCase Activity :: Duration

This forum was archived on 2017-11-26.