Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Expose Time Tracker Start and Stop in API #5942

Closed
2 of 7 tasks
ekrgb opened this issue Feb 3, 2019 · 3 comments · Fixed by #5970
Closed
2 of 7 tasks

Feature Request: Expose Time Tracker Start and Stop in API #5942

ekrgb opened this issue Feb 3, 2019 · 3 comments · Fixed by #5970
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@ekrgb
Copy link

ekrgb commented Feb 3, 2019

  • Gitea version (or commit ref): 1.7.1 (Docker image from Docker Hub)
  • Git version: N/A
  • Operating system: openSuSE Leap 15.0
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    N/A

Description

While it is possible to add time to an issue, it is not possible to trigger the functionality to start or stop logging time on an issue as it is provided by the Web Interface (see screen below) via API (in accordance to /api/swagger in version 1.7.1).

By this feature request I want to suggest to expose this functionality via API as well - including the ability to query if time us currently tracked ("Start" was issued but no "Stop" yet) or not.

Thank you very much for considering this feature request.

Background

Concrete Personal Example

Just my personal issue which would be solved by the implementation of this request:

We are managing our tasks and issues via the "issues functionality" in Gitea, which is working very well for us. By doing so, we also use the "Start" and "Stop" time tracking functionality via the Gitea Web Interface (which seems to had been introduced by #967) which comes very handy.

One issue with that is, that when an Gitea issue is closed by mentioning it in the commit comment or pull request (see #462), the time tracking is not stopped. That for itself would not be a problem as a web hook could be registered for issue changes and when called an API call could be issued to stop the time tracking on the issue - if such an API call would be available.

I would suggest not to change the behaviour when the issue is closed by mentioning it in the commit comment or pull request, as this would allow the maximum flexibility but to allow for automation like outlined above it would be necessary to have the "Start/Stop" functionality exposed via API.

In General

In general I believe it would make a lot of sense to expose the "Start/Stop" functionality exposed via API as there could be a number of scenarios where this would allow automation for more efficient handling of issues in Gitea.

Screenshots

Time Tracker in UI for Reference

image

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Feb 3, 2019
@adelowo
Copy link
Member

adelowo commented Feb 5, 2019

While this is nice, in the meantime while we wait on the PR for an API, I will update #4327 to take issues that are closed via commits into account too

@adelowo
Copy link
Member

adelowo commented Feb 5, 2019

@ekrgb #4327 has been merged so the root cause of this issue should be fixed.
The Stopwatch will be stopped whenever an issue is closed ( via close button or a commit. ).

There wouldn't be a backport to 1.7.X so you will need to
make use of the docker image built off master.

Regardless, this issue will still be opened pending a PR for the API.

@ekrgb
Copy link
Author

ekrgb commented Feb 5, 2019

@adelowo great! thank you very much!

@techknowlogick techknowlogick added the modifies/api This PR adds API routes or modifies them label Feb 5, 2019
@lafriks lafriks added this to the 1.8.0 milestone Feb 7, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants