Report problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • peterberlin
    Active Community Member
    • Mar 2015
    • 1004

    #1

    Report problem

    Hi,
    For reports that access "Event" modules, you can evaluate the duration. You can not sum the duration.
    peter
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9641

    #2
    Hi Peter,

    In entityDefs of your entity (in custom dir) you need to append to duration field definition:

    PHP Code:
    ,
                
    "select""TIMESTAMPDIFF(SECOND, date_start, date_end)",
                
    "orderBy""duration {direction}" 
    It will look like
    PHP Code:
            "duration": {
                
    "type""duration",
                
    "start""dateStart",
                
    "end""dateEnd",
                
    "options": [9001800360072001080086400],
                
    "default"3600,
                
    "notStorable"true,
                
    "select""TIMESTAMPDIFF(SECOND, date_start, date_end)",
                
    "orderBy""duration {direction}"
            
    }, 
    In the next advanced pack release it will work. But duration sum will be displayed in seconds

    Comment

    • peterberlin
      Active Community Member
      • Mar 2015
      • 1004

      #3
      Thank you very much

      Comment

      Working...