Duration in Workflow Tracking pages

The oppo_duration field is defined in the custom_edits tables as being of Entry Type 'Minutes'. The minutes are held as the physical data type 'int'

select * from custom_edits where colp_entrytype = 57

Fields of entry type 'Minutes' can be used in any entity and they have a couple of interesting features.

The first is that a field defined as 'Minutes' is ReadOnly and can not be set to be editable in entry screens. They are designed for display purposes only. If the field holds an integer value representing minutes it is then shown combined with a caption drawn from the TimePeriods caption family in the custom_captions table.

So a value in the field of
  • 1 displays as 1 Minute
  • 10 displays as 10 Minute(s)
  • 90 displays as 1 Hour 30 Minute(s)
  • 1000 displays as 1 Day 8 Hour(s) 10 Minute(s)
  • 2000 displays as 3 Day(s) 7 Hour(s) 50 Minute(s)
The translations are from the meta data table custom_captions

Capt_family = TimePeriods


2) The second feature is that when a Field of type Minutes is null then the value that is displayed is calculated from the record's createddate using the default Business Calendar. See Administration -> System -> Timings

Imagine that the time now is 11:53 am on 25th February 2008. A record may have been created at 1:15 pm on 28th January. Although in strict calendar terms these are 28 days apart the Minutes field (which is null) would display "19 Day(s) 7 Hour(s) 9 Minute(s)" because of the settings in the calendar. If you take into account 4 sets of weekends then you can start to understand how the displayed figures are calculated.