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

Ability to edit and delete Time Tracking entries #2642

Closed
Caballerog opened this issue Oct 3, 2017 · 17 comments · Fixed by #14100
Closed

Ability to edit and delete Time Tracking entries #2642

Caballerog opened this issue Oct 3, 2017 · 17 comments · Fixed by #14100
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented outdated/theme/timetracker type/enhancement An improvement of existing functionality

Comments

@Caballerog
Copy link

Description

I'm testing the feature Time tracking (#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?

@lafriks lafriks added the type/enhancement An improvement of existing functionality label Oct 3, 2017
@lafriks lafriks added this to the 1.x.x milestone Oct 3, 2017
@lafriks lafriks changed the title Feature request: Time Tracking (update) Ability to edit and delete Time Tracking entries Oct 3, 2017
@kolaente
Copy link
Member

kolaente commented 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.

@Morlinest
Copy link
Member

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...

@lafriks
Copy link
Member

lafriks commented Oct 3, 2017

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

@Caballerog
Copy link
Author

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.

@jonasfranz
Copy link
Member

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.

@MrHaroldA
Copy link

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.

@jonasfranz
Copy link
Member

@MrHaroldA I'm currently working on this.

@jlcummings
Copy link

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.

@MrHaroldA
Copy link

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.

@stale
Copy link

stale bot commented 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 stale bot added the issue/stale label Jan 6, 2019
@stale
Copy link

stale bot commented Feb 23, 2019

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

@stale stale bot closed this as completed Feb 23, 2019
@lafriks lafriks reopened this Feb 23, 2019
@stale stale bot removed the issue/stale label Feb 23, 2019
@lafriks lafriks added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Feb 23, 2019
@Diverti
Copy link

Diverti commented 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.

@FriedrichVonSchnitzel
Copy link

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.

@guillep2k
Copy link
Member

@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.

@FriedrichVonSchnitzel
Copy link

@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.

@chriseaton
Copy link

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?

@noerw
Copy link
Member

noerw commented 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>

@6543 6543 modified the milestones: 1.x.x, 1.14.0 Dec 22, 2020
@lunny lunny modified the milestones: 1.14.0, 1.x.x Jan 27, 2021
@lunny lunny removed this from the 1.x.x milestone Feb 21, 2021
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented outdated/theme/timetracker type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.