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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Changing Duration in Activities from Minutes to Hours
Pages: [1]

Author Topic: Changing Duration in Activities from Minutes to Hours  (Read 616 times)

matthewboh

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 2
Changing Duration in Activities from Minutes to Hours
February 25, 2012, 09:01:16 am
I have a request to track activities in hours instead of minutes. Using the Word Replacement capability, it was fairly easy to change the screen items over to hours. However, you can only enter integers into that field.

I've gone ahead and tried to just alter the table, changing duration from INT to FLOAT to see if that was an easy fix - but it appears that the underlying code is still expecting an INT and maintains the error.

I know in the past, CiviCRM used to have hour and minute fields. Could it be possible to have that field changed to a float and remove the restriction for integers only? That way it would be easy to have it as hours or minutes.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Changing Duration in Activities from Minutes to Hours
February 25, 2012, 09:44:07 am

minutes is also an integer field? does the org track sub-minutes?

not sure why u'd want a float for minutes. If you change the text and get them to enter minutes it should work fine

i dont think we do any "math" on those fields (at least right now)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

matthewboh

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 2
Re: Changing Duration in Activities from Minutes to Hours
February 25, 2012, 12:05:30 pm
The problem is that they want to put in 4.5 for 4 and a half hours or 4.25 for 4 and a quarter. However, there seems to be quite a bit of code in the screen handlers to make sure that only integers are entered. I'm just going to offer to change their reports to divide the total number of minutes by 60 to give them their hours.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Changing Duration in Activities from Minutes to Hours

This forum was archived on 2017-11-26.