Skip to content

Draft: Resolve "Support for division/multiplication/tonumber formula for duration field"

What is in this MR

  • is now possible to do divisions/multiplications between durations and numbers.
  • 2 new formulas have been added to convert duration to seconds and vice versa.
  • is now possible to use all the rollup functions on a duration field: max, min, count, sum, avg, stdev, variance, etc.
  • is now possible to use the postgres interval format to define a duration.

How to test this MR

  • Verify is now possible to do multiplication/divisions between durations and numbers
  • Verify is now possible to convert a duration to the number of seconds with toseconds and vice versa with toduration
  • Verify it's possible to create a rollup field with a duration field and all the formulas are working correctly
  • verify it's possible to use the postgres format (https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-OUTPUT) to set a duration value in the api.
  • verify that if you create a duration field and a lookup of a duration field on develop and then you switch on this branch, everything still works as expected (this MR change how array of durations are stored in the BD, but the duration serializer handle the difference and return duration as the number of seconds as it was before)

Merge Request Checklist

  • changelog.md has been updated if required.
  • New/updated Premium/Enterprise features are separated correctly in the premium or enterprise folder
  • The latest Chrome and Firefox have been used to test any new frontend features
  • Documentation has been updated
  • Quality Standards are met
  • Performance: tables are still fast with 100k+ rows, 100+ field tables
  • The redoc API pages have been updated for any REST API changes
  • Our custom API docs are updated for changes to endpoints accessed via api tokens
  • The UI/UX has been updated following UI Style Guide

Closes #2416

Edited by Davide Silvestri

Merge request reports