Edit manually added time tracker events #3029

Closed
opened 2025-11-02 04:57:56 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @akagiharu on GitHub (Mar 8, 2019).

Description

When I try to add negative time after it has some time (eg.: 2h30min) and i want to edit it to put 2h:20m, but only on minutes with -10 at ranges give me an error.

Screenshots

1st Step - Put negative range
2nd Step - Unknow Error: Range Error

Originally created by @akagiharu on GitHub (Mar 8, 2019). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [x ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x ] Yes (https://try.gitea.io/akagiharu/test/pulls/1) - [ ] No - [ ] Not relevant - Log gist: ## Description When I try to add negative time after it has some time (eg.: 2h30min) and i want to edit it to put 2h:20m, but only on minutes with -10 at ranges give me an error. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> [1st Step - Put negative range](http://prntscr.com/mv5a3e) [2nd Step - Unknow Error: Range Error](http://prntscr.com/mv5ad1)
GiteaMirror added the type/featureoutdated/theme/timetrackerissue/duplicate labels 2025-11-02 04:57:56 -06:00
Author
Owner

@zeripath commented on GitHub (Mar 9, 2019):

It's deliberate that you cannot add negative time as it doesn't necessarily make the most sense and the problem with removing time generally is that you need to codify who can remove time and whose time they can remove.

A probably better alternative is to add the ability to edit tracked time events.

@zeripath commented on GitHub (Mar 9, 2019): It's deliberate that you cannot add negative time as it doesn't necessarily make the most sense and the problem with removing time generally is that you need to codify who can remove time and whose time they can remove. A probably better alternative is to add the ability to edit tracked time events.
Author
Owner

@akagiharu commented on GitHub (Mar 10, 2019):

That alternative, how can I add that ability to edit? Or will you guys add that ability?

@akagiharu commented on GitHub (Mar 10, 2019): That alternative, how can I add that ability to edit? Or will you guys add that ability?
Author
Owner

@zeripath commented on GitHub (Mar 12, 2019):

Ok so this would require some backend and UI work. We don't currently have this.

Depending on your skill set you can add this feature as a PR, or you could propose the UI here.

I think I know a way of doing it but at present am working on other things.

@zeripath commented on GitHub (Mar 12, 2019): Ok so this would require some backend and UI work. We don't currently have this. Depending on your skill set you can add this feature as a PR, or you could propose the UI here. I think I know a way of doing it but at present am working on other things.
Author
Owner

@akagiharu commented on GitHub (Mar 12, 2019):

Should I propose the UI here on this topic?

@akagiharu commented on GitHub (Mar 12, 2019): Should I propose the UI here on this topic?
Author
Owner

@jorgepg17 commented on GitHub (Mar 12, 2019):

At this moment i only can edit this on database, but i have to many users and repos on my company so if theres a way to edit it manually in UI or changing some definitions you can send us the link or video our other example to know how to edit that?

@jorgepg17 commented on GitHub (Mar 12, 2019): At this moment i only can edit this on database, but i have to many users and repos on my company so if theres a way to edit it manually in UI or changing some definitions you can send us the link or video our other example to know how to edit that?
Author
Owner

@zeripath commented on GitHub (Mar 13, 2019):

Yes suggest the UI here in this issue, so we can track it - that is unless you're able to do a PR.

@zeripath commented on GitHub (Mar 13, 2019): Yes suggest the UI here in this issue, so we can track it - that is unless you're able to do a PR.
Author
Owner

@stale[bot] commented on GitHub (May 12, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (May 12, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (May 26, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (May 26, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Author
Owner

@HenrikBengtsson commented on GitHub (Sep 25, 2019):

Please reopen this issue. Being able to correct time tracked is critical for it to be useful. Currently, it is too easy to forget to click 'Stop' resulting it too much time being accumulated. This will drive users to use 'Add time'. It's also quite easy to enter too much time when using 'Add time'.

I argue that it's better to allow users to enter negative time to adjust their own time spent for now until more refined ownership can be supported. If one cannot trust the user to do this, how can we trust them to add/track time in the first place?

@HenrikBengtsson commented on GitHub (Sep 25, 2019): Please reopen this issue. Being able to correct time tracked is critical for it to be useful. Currently, it is too easy to forget to click 'Stop' resulting it too much time being accumulated. This will drive users to use 'Add time'. It's also quite easy to enter too much time when using 'Add time'. I argue that it's better to allow users to enter **negative** time to adjust their own time spent for now until more refined ownership can be supported. If one cannot trust the user to do this, how can we trust them to add/track time in the first place?
Author
Owner

@no-go commented on GitHub (Jul 30, 2020):

Because a person in my company still forgets the stopwatch and add gigant times. The easiest way is to delete and add a new time to adjust the tracked times. After playing around with the gitea database, deleting suggest easy to me. Now I try to build an application for it (delete times and list user Stopwatches) with the swagger api and I found some ugly solutions in it:

  • the swagger API has a "delete" for Time Tackers (/repos/{owner}/{repo}/issues/{index}/times/{id}) but it just adds the time with a negative value (why?) and does not delete its type 12 and 13 entries (or 14) in comment table and the corresponding entry in tracked_time table
  • the swagger API has a "get" for StopWatches, but it returns only "issue_index" (and this means, I have to search in all repos and users to get the name of the issue with this index)

I think fixing the strange delete in the API and adding more detail to StopWatches in the API are some changes I will do in the next days. Maybe there will come a merge request in the future.

@no-go commented on GitHub (Jul 30, 2020): Because a person in my company still forgets the stopwatch and add gigant times. The easiest way is to delete and add a new time to adjust the tracked times. After playing around with the gitea database, deleting suggest easy to me. Now I try to build an application for it (delete times and list user Stopwatches) with the swagger api and I found some ugly solutions in it: - the swagger API has a "delete" for Time Tackers (`/repos/{owner}/{repo}/issues/{index}/times/{id}`) but it just adds the time with a negative value (why?) and does not delete its type 12 and 13 entries (or 14) in comment table and the corresponding entry in tracked_time table - the swagger API has a "get" for StopWatches, but it returns only "issue_index" (and this means, I have to search in all repos and users to get the name of the issue with this index) I think fixing the strange delete in the API and adding more detail to StopWatches in the API are some changes I will do in the next days. Maybe there will come a merge request in the future.
Author
Owner

@noerw commented on GitHub (Dec 21, 2020):

duplicate, closing in favor of #2642

@noerw commented on GitHub (Dec 21, 2020): duplicate, closing in favor of #2642
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3029