Ability to edit and delete Time Tracking entries #1114

Closed
opened 2025-11-02 03:49:06 -06:00 by GiteaMirror · 17 comments
Owner

Originally created by @Caballerog on GitHub (Oct 3, 2017).

Description

I'm testing the feature Time tracking (https://github.com/go-gitea/gitea/issues/967), which I think that is very useful, but should allow that the user modify or delete a time tracking event because It can make a mistake.

Imagine that I made the mistake of not remembering to close a task or that I entered a very large number in error. It would make this feature useless.

At the moment, I am able to update using the database directly.

What do you think about?

Originally created by @Caballerog on GitHub (Oct 3, 2017). <!-- 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. --> ## Description I'm testing the feature Time tracking (https://github.com/go-gitea/gitea/issues/967), which I think that is very useful, but should allow that the user modify or delete a time tracking event because It can make a mistake. Imagine that I made the mistake of not remembering to close a task or that I entered a very large number in error. It would make this feature useless. At the moment, I am able to update using the database directly. What do you think about?
GiteaMirror added the outdated/theme/timetrackerissue/confirmedtype/enhancement labels 2025-11-02 03:49:06 -06:00
Author
Owner

@kolaente commented on GitHub (Oct 3, 2017):

Should be an option for admins only, maybe with you can only delete your own times if you're not an admin.

@kolaente commented on GitHub (Oct 3, 2017): Should be an option for admins only, maybe with you can only delete your own times if you're not an admin.
Author
Owner

@Morlinest commented on GitHub (Oct 3, 2017):

Maybe more detailed settings for who can delete it, like:

  1. Admin
  2. Repo owner
  3. Repo maintainers
  4. User (who created time record)
  5. Specific user

Another thing is to lock any modification (eg. monthly report) for repository, user or combination of both, but that can be new feature...

@Morlinest commented on GitHub (Oct 3, 2017): Maybe more detailed settings for who can delete it, like: 1. Admin 2. Repo owner 3. Repo maintainers 4. User (who created time record) 5. Specific user Another thing is to lock any modification (eg. monthly report) for repository, user or combination of both, but that can be new feature...
Author
Owner

@lafriks commented on GitHub (Oct 3, 2017):

I think only repo admin & user who created time record can edit&delete it

@lafriks commented on GitHub (Oct 3, 2017): I think only repo admin & user who created time record can edit&delete it
Author
Owner

@Caballerog commented on GitHub (Oct 6, 2017):

I think that should be very simple like @lafriks said. I.e, only repo admin & user who created time record should can edit&delete it.

@Caballerog commented on GitHub (Oct 6, 2017): I think that should be very simple like @lafriks said. I.e, only repo admin & user who created time record should can edit&delete it.
Author
Owner

@jonasfranz commented on GitHub (Oct 17, 2017):

I think that we have two options for this.

  1. A separate modal with the time tracking entries with options to delete/edit them.
  2. Buttons at the comment entry of every time tracking comment. This need some changes in the database which would require it to add this to the 1.3.0 milestone because comments before the change could not be used for editing / deleting because of the lack of relationship to the time tracking database entry.
@jonasfranz commented on GitHub (Oct 17, 2017): I think that we have two options for this. 1. A separate modal with the time tracking entries with options to delete/edit them. 2. Buttons at the comment entry of every time tracking comment. This need some changes in the database which would require it to add this to the `1.3.0` milestone because comments before the change could not be used for editing / deleting because of the lack of relationship to the time tracking database entry.
Author
Owner

@MrHaroldA commented on GitHub (Aug 13, 2018):

What if Gitea would only support deleting time entries for the time being? This should be way easier to implement than an edit modal and will allow us to start using the time tracking feature.

@MrHaroldA commented on GitHub (Aug 13, 2018): What if Gitea would only support deleting time entries for the time being? This should be way easier to implement than an edit modal and will allow us to start using the time tracking feature.
Author
Owner

@jonasfranz commented on GitHub (Aug 18, 2018):

@MrHaroldA I'm currently working on this.

@jonasfranz commented on GitHub (Aug 18, 2018): @MrHaroldA I'm currently working on this.
Author
Owner

@jlcummings commented on GitHub (Oct 19, 2018):

Instead of deleting or directly editing an entry, which could smash traceability/accountability, I would rather see an 'Adjustment' action that allows adding negative (or positive) entries to the cumulative time duration. There should be two base forms of adjustment, with three options:

  1. Soft, One-For-One (Referential Adjustment): when a particular prior time entry is referenced explicitly, negative (or positive) time can be added. This could be available to the person who made the original erroneous entry, or a project maintainer. This should be the typical, day-to-day use case.
  2. Soft, One-For-Many (Referential Adjustment): when a particular set of prior time entries are referenced explicitly for the negative (or positive) time entry, indicating those were erroneous and this adjustment attempts to correct them together in one cumulative adjustment. This could be available to the person who made the originally erroneous referenced entries, or the project maintainer. This would be an uncommon, but helpful use-case for bulk-maintenance.
  3. Hard (Non-Referential Adjustment): where only the project owner could add negative time without referencing prior time keeping entries. This is where the project owner/primary maintainer knows of an overall error in timekeeping, and wants to address it with a hammer. This should typically be a rare, but essential use-case.

This promotes an accounting style of time management, where you can't change what is done, but you can acknowledge a mistake, correct it the best you can, and move forward.

@jlcummings commented on GitHub (Oct 19, 2018): Instead of deleting or directly editing an entry, which could smash traceability/accountability, I would rather see an 'Adjustment' action that allows adding negative (or positive) entries to the cumulative time duration. There should be two base forms of adjustment, with three options: 1. Soft, One-For-One (Referential Adjustment): when a particular prior time entry is referenced explicitly, negative (or positive) time can be added. This could be available to the person who made the original erroneous entry, or a project maintainer. This should be the typical, day-to-day use case. 1. Soft, One-For-Many (Referential Adjustment): when a particular set of prior time entries are referenced explicitly for the negative (or positive) time entry, indicating those were erroneous and this adjustment attempts to correct them together in one cumulative adjustment. This could be available to the person who made the originally erroneous referenced entries, or the project maintainer. This would be an uncommon, but helpful use-case for bulk-maintenance. 1. Hard (Non-Referential Adjustment): where only the project owner could add negative time without referencing prior time keeping entries. This is where the project owner/primary maintainer knows of an overall error in timekeeping, and wants to address it with a hammer. This should typically be a rare, but essential use-case. This promotes an accounting style of time management, where you can't change what is done, but you can acknowledge a mistake, correct it the best you can, and move forward.
Author
Owner

@MrHaroldA commented on GitHub (Oct 19, 2018):

This promotes an accounting style of time management, where you can't change what is done, but you can acknowledge a mistake, correct it the best you can, and move forward.

This is way overkill for our needs: some simple logging of who changed the logged hours would suffice in all our use cases.

@MrHaroldA commented on GitHub (Oct 19, 2018): > This promotes an accounting style of time management, where you can't change what is done, but you can acknowledge a mistake, correct it the best you can, and move forward. This is way overkill for our needs: some simple logging of who changed the logged hours would suffice in all our use cases.
Author
Owner

@stale[bot] commented on GitHub (Jan 6, 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 (Jan 6, 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 (Feb 23, 2019):

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

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

@Diverti commented on GitHub (Feb 15, 2020):

I hope it will be implemented, would be awesome. Also a table to overview all the tracked time in the repo would be great also.

@Diverti commented on GitHub (Feb 15, 2020): I hope it will be implemented, would be awesome. Also a table to overview all the tracked time in the repo would be great also.
Author
Owner

@FriedrichVonSchnitzel commented on GitHub (Apr 3, 2020):

I think only repo admin & user who created time record can edit&delete it

Currently working with Gitea Version: 1.11.0 as "Owner" and repository administrator, and I can't edit/delete (even) my own time for some reason. The red cross next to the entry is not displayed. Not sure if this should be reported separately as a bug.

@FriedrichVonSchnitzel commented on GitHub (Apr 3, 2020): > I think only repo admin & user who created time record can edit&delete it Currently working with Gitea Version: 1.11.0 as "Owner" and repository administrator, and I can't edit/delete (even) my own time for some reason. The red cross next to the entry is not displayed. Not sure if this should be reported separately as a bug.
Author
Owner

@guillep2k commented on GitHub (Apr 4, 2020):

@FriedrichVonSchnitzel I don't use the time tracking function, but I've just read a comment in another thread from a user saying that their problems with time tracking not working were solved when they've upgraded to 1.11.4. Can you check if that's your case too? Also, I wouldn't stay on 1.11.0 because it has some annoying bugs that have been fixed in 1.11.3 and up.

@guillep2k commented on GitHub (Apr 4, 2020): @FriedrichVonSchnitzel I don't use the time tracking function, but I've just read a comment in another thread from a user saying that their problems with time tracking not working were solved when they've upgraded to 1.11.4. Can you check if that's your case too? Also, I wouldn't stay on 1.11.0 because it has some annoying bugs that have been fixed in 1.11.3 and up.
Author
Owner

@FriedrichVonSchnitzel commented on GitHub (Apr 4, 2020):

@guillep2k thank you for your reply, we have updated to 1.11.4, but the red cross next to the entry is still not displayed. I've also tried unchecking the "Let Only Contributors Track Time" in the repository settings.

@FriedrichVonSchnitzel commented on GitHub (Apr 4, 2020): @guillep2k thank you for your reply, we have updated to 1.11.4, but the red cross next to the entry is still not displayed. I've also tried unchecking the "Let Only Contributors Track Time" in the repository settings.
Author
Owner

@chriseaton commented on GitHub (Apr 21, 2020):

This has got me a few times, I accidentally entered the wrong time and there's no way to adjust it. I think, at a minimum, be able to clear it, or just edit it. It already shows it in the activity of the issue anyways? Why make this more difficult than it needs to be.

If no edit or delete, how about being able to subtract time?

@chriseaton commented on GitHub (Apr 21, 2020): This has got me a few times, I accidentally entered the wrong time and there's no way to adjust it. I think, at a minimum, be able to clear it, or just edit it. It already shows it in the activity of the issue anyways? Why make this more difficult than it needs to be. If no edit or delete, how about being able to subtract time?
Author
Owner

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

I'll try to implement a UI for this in the coming days/weeks.

As a stop gap: the tea CLI for gitea can already reset and delete specific times via the API:

tea times reset <issue index>
tea times rm <issue index> <time id>
@noerw commented on GitHub (Dec 21, 2020): I'll try to implement a UI for this in the coming days/weeks. As a stop gap: the [`tea` CLI](https://gitea.com/gitea/tea) for gitea can already reset and delete specific times via the API: ``` tea times reset <issue index> tea times rm <issue index> <time id> ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1114