Skip to content

Changed timelogCreate mutation to not require the spentAt field

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

When creating a timelog from the UI without specifying the Spent at field it defaulted to setting the field value from the browser locale.

This could generate issues when the server where GitLab is running is behind (time-wise) from the local browser time, because it return an error checking that the timelog being create is not "created in the future".

By moving the "spent at" assignment to the backend we avoid this issue, which this MR is for 🙂

This MR loosens the required fields on the timelogCreate mutation to allow not providing the spentAt field and defaulting to the current time on the backend 🙂

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N.A.

How to set up and validate locally

N.A.

Edited by Marcin Sedlak-Jakubowski

Merge request reports