Resolve "Support time logging in commit messages"
What does this MR do and why?
This change adds the ability to track time spent on issues directly from commit messages. Users can now include time tracking information in their commits using the format @1h30m
alongside issue references (e.g., "Fix bug in #123 (closed) @2h30m"). When a commit with this syntax is processed, GitLab automatically adds the specified time to the referenced issues and creates a system note to record that time was added via a commit.
The implementation includes:
- A new TimeTrackingExtractor class that parses commit messages for time tracking information
- Updates to the ProcessCommitWorker to extract and record time spent
- Comprehensive documentation explaining how to use this feature
- Thorough test coverage for the new functionality
This feature makes time tracking more seamless by allowing developers to record time as they work without having to update issues separately.
Screenshots or screen recordings
How to set up and validate locally
- Create a new Project
- Create an issue in the project
- Checkout the source code, do a change and commit with a message in the following format "Fix bug in #123 (closed) @2h30m"
- Check if the time spent was added to the issue mentioned in the commit message
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #16543 (closed)