tasks icon indicating copy to clipboard operation
tasks copied to clipboard

[Feature Request] Time tracking

Open Sigi74 opened this issue 8 years ago • 32 comments


If you want to help fund to make this happen, contribute to the bounty on Bountysource! :tada:

Sigi74 avatar May 17 '17 15:05 Sigi74

This would be amazing! And to be really useful there should also be a reporting function to show the tracked hours for a specific time frame and user.

Creanimo avatar May 28 '17 07:05 Creanimo

I could imagine to have this in the app, but this has very low priority. Feel free to send a PR, though.

raimund-schluessler avatar Jul 22 '17 15:07 raimund-schluessler

In order to have this working properly, we would need to store the tracked time in a separate table in the database, so we could query it in a more flexible way, than with the CalDAV entries.

raimund-schluessler avatar Jul 30 '17 12:07 raimund-schluessler

Hi there! This is a very important function for me, as I am frequently asked to provide detailed logs of my time spent on assorted assignments. Sometimes, it's hard to keep track of all of the categories I need to track. There are services which provide this, but none that are FOSS and self-hosted, from what I can see.

I built a simple timer web app for my own personal use, but I've recently fallen in love with Nextcloud and would love to build a similar timer function into the Nextcloud Tasks. Are there guidelines for new PRs to this project? I haven't dug into the database table aspect of this (as it relates to Nextcloud, that is), so doing a bit of digging into that would be mandatory first.

I'd also like to allow a shareable calendar with the time spent on each task. This would be extremely helpful in my day job, where Outlook looms over my head. I think I can do it, but again, more digging will be required.

Does this project allow for community members to be assigned issues in GitHub? If so, I'd like to take this one!

P.S. I also know there's a backlogged OwnCloud issue echoing this one: https://github.com/owncloud/apps/issues/2109. That one showed a bounty, not sure if it's still offered.

veronica-oldilocks avatar Nov 13 '17 17:11 veronica-oldilocks

@theVKC awesome to have you on board! Anyone in the nextcloud organization can be assigned to issues on Github. @jancborchardt @LukasReschke @MorrisJobke can you help out and add @theVKC to the organization?

About the issue itself: There are in my opinion two options how to solve this: For one this can be implemented directly in the tasks app. Alternatively this could be done in a separate app, which offers its own backend (+ connection to the database) and possibly its own frontend. In addition to its own frontend it could inject javascript / css / whatever you need into the tasks app. This would separate the code and might allow you to get started with a simple implementation of a timer app for nextcloud and later extending to the tasks app. @raimund-schluessler what do you think?

Regarding the bounty: @smatthie do you still want to support this feature? This would be the time and place 😉

Henni avatar Nov 13 '17 22:11 Henni

I'm gearing up and ready to go!! Virtual-machine Nextcloud instance, here I come!

Any organization-based guidelines you-all have would be swell. Can't wait!

veronica-oldilocks avatar Nov 14 '17 00:11 veronica-oldilocks

@theVKC cool, added you to the organization and the Tasks team. Welcome! :)

From a UX view, we should definitely integrate this into the Tasks app. A separate app would have lower visibility and also require you to switch between creating tasks and tracking time. (Or recreating stuff the Tasks app already does.)

Regarding database format it might make sense to also coordinate with @juliushaertl & @pixelipo of the Deck app so that when they switch to CalDAV, time tracking would also be possible from their end.

The direct creation of events inside the Calendar about the tracked time sounds great! :) Maybe that's what is needed instead of a database, like hidden calendars, or disabled by default?

jancborchardt avatar Nov 14 '17 07:11 jancborchardt

Welcome to the team @theVKC ! :wave:

I agree that this would be a very useful app/feature and I'd be happy to help with testing. Do you want to talk spec? Here's a few things that might be worth considering (long-term):

  • from/to hours would be useful, but shouldn't be obligatory fields
  • if it was a standalone app, should it have an option to be visible in all apps?
  • if so, should it be a floating widget or an input field in the header?
  • if so, it should be able to search for tasks (in Tasks and Deck?)
  • if it created a shareable calendar, should it be one per user or one per list(Task app)/board(Deck app)?
  • should tasks in Task/Deck apps include a list of worklogs done on that particular task?
  • should tasks in Task/Deck apps show total amount of work done?
  • in shared lists/boards, should other members' hours be visible as well?
  • should old worklogs be editable?
  • it should be possible to add worklogs retroactively

pixelipo avatar Nov 14 '17 10:11 pixelipo

Again from a UX view, I would recommend starting from a very small core of what we need. Interface-wise, that could basically mean simply a »Start« / »Stop« (or »Start tracking« / »Stop tracking«) button for either a task or a collection of tasks and a feedback on the total time spent on it (current + previous sessions). Everything else should be handled in the backend.

I recommend checking out https://toggl.com which is a very well-designed and focused time-tracking software.

jancborchardt avatar Nov 14 '17 15:11 jancborchardt

I agree with @jancborchardt - MVP (minimal viable product) is the way to go. It's good though, to list some of the extended possibilities from the start, in order not to make some architecture decisions that might prohibit (or make it "costly") to implement them later on.

pixelipo avatar Nov 14 '17 20:11 pixelipo

Regarding the UI: I would put the timetracking stuff into the details view of a task. In order to not clutter the details view to much we should create a tabbed view (similar to the files app with comments/share/versions). For tasks this could e.g. be general/time tracking/notes or similar. In this tab we could have a button to start/stop tracking time working on this task. Optionally we could also show a stop button and the passed time in the header of Nextcloud. Everytime you start working on a task, a new entry should be generated showing you the start and end time of the current session. All these timespans could then be shown in a table under the time tracking tab with a summary of the overall time spent working on this task at the bottom (or top for better overview). Also, we could consider giving a summary of the time spent working on all tasks of a calendar/list. For first version of this feature, I would not aim for much more than this. We can enhance it later on. If I find the time, I will create a mockup.

Regarding the backend I am not quite sure. Storing every entry as a CalDAV entry seems to be very unflexible. All the data would need to be stored in the calendardata field of the calendarobjects table as X-NC- properties. In order to evaluate which entry relates to which task we would need to check all entries and parse their calendardata. This looks like a huge performance limitation to me. Also this would probably complicate the calculations of the overall time for very much the same reason. Hence, I think we should create a separate table and store every timespan as a separate entry with the id of the related task, the userid, the start and endtime and maybe the duration. We could probably expose these entries as CalDAV entries later on if I understood it correctly.

Feedback about these thoughts is very welcome. Also @georgehrke and @juliushaertl

raimund-schluessler avatar Nov 14 '17 22:11 raimund-schluessler

I recommend checking out https://toggl.com which is a very well-designed and focused time-tracking software.

We should definitely have a look at the toggle browser extensions, that allow you to track time for stuff on other websites like GitHub issues. Therefore we should somehow consider in datastructure design that we might have several sources of tasks, like a URL to a github issue.

I would put the timetracking stuff into the details view of a task. In order to not clutter the details view to much we should create a tabbed view (similar to the files app with comments/share/versions). For tasks this could e.g. be general/time tracking/notes or similar. In this tab we could have a button to start/stop tracking time working on this task.

That is also what I have in mind for deck.

Hence, I think we should create a separate table and store every timespan as a separate entry with the id of the related task, the userid, the start and endtime and maybe the duration.

I think we should start with a more generic design and not limit it to a id of task. We could go for something like object type and object id, as it is done for the notifications app. That way it is up to the integrator of the time tracking app how they relate any database/caldav object to the time tracking.

juliusknorr avatar Nov 15 '17 06:11 juliusknorr

I think we should start with a more generic design and not limit it to a id of task. We could go for something like object type and object id, as it is done for the notifications app. That way it is up to the integrator of the time tracking app how they relate any database/caldav object to the time tracking.

I am fine with a generic design, but I am not convinced that this is necessary. It would only make sense if multiple apps share the same table for time-tracking, otherwise it would not need to be generic. But using the same table by multiple 3rd party apps not included in server is a very bad idea, because it creates cross-dependencies, makes maintaining difficult and complicates changes on this table. This is something we always tried to avoid.

raimund-schluessler avatar Nov 15 '17 13:11 raimund-schluessler

Regarding the bounty: @smatthie do you still want to support this feature? This would be the time and place :wink:

Yes. My old bounty is still open (I think, I'm not totally sure how this bounty system works with such old requests and if/how I have to renew it or transfer it from owncloud to nextcloud - any advice?): https://www.bountysource.com/issues/27109920-app-request-time-tracker

I can't comment much right now as I'm quite busy and not familiar with nextcloud internals. The discussion so far sounds all ok, and I don't really have any particular preference how it is implemented. The main points for me are, from a user perspective

  • the timer should be easy to start and stop, ideally with just one click for existing tasks.
  • it should record the actual times worked on a task, not just the totals like a stopwatch.
  • some way to easily see some summary statistics (table or graph of time spent on different tasks)

I suggested the calendar system as backend earlier, but @raimund-schluessler makes a good point about performance. It would be nice though to show the timed sessions graphically in a calendar.

31SFX4 avatar Nov 18 '17 07:11 31SFX4

OK folks! Looking through all of the comments here and digesting them. I'm also personally familiar with Toggl, and as a matter of fact, Toggl inspired my own self-hosted solution. Other than security (self-hosted FTW), my primary concerns with Toggl were:

  1. Advanced reporting (such as canned reports) as a premium feature. Eww.
  2. Toggl uses a linear time tracking mechanism (one task at a time), wheras in real life, time tracking is more nuanced (even at times concentric).
    • Example: I want to track the time spent in the task of "go to work Tuesday" (for timesheet purposes) while also tracking the time spent on "check GitHub issues". Working on GitHub issues isn't necessarily a subtask of working on Tuesday, and in fact can spread across many days. Toggl seems to ignore this concept, focusing instead on a linear, category-driven time tracker.

Advanced reporting (like canned sharable reports) is likely beyond this specific GitHub issue, and I might prefer to think of it as an enhancement request, especially in light of @jancborchardt's comment earlier about simplicity. Correct me if I'm wrong. :)

So to me, from what I can see in the above comments and my brief foray into the depths of the tasks app, the basic concept for this feature would look like:

  • A start/stop on each task, easily accessible in the task list (perhaps next to the priority star)
    • Taking inspiration from Toggl, but allowing multiple tasks to be marked as "in progress" as I outlined above.
  • Some kind of simple summary report (showing times and totals by task and/or by date).

Am I reading the room correctly? Any thoughts?

veronica-oldilocks avatar Nov 21 '17 20:11 veronica-oldilocks

@theVKC it would be best if this was a standalone app that Tasks (and later, Deck) would connect to via API, but perhaps it's too much for the initial release.

Also, a manual worklog entry form should be implemented as early as possible.

pixelipo avatar Nov 22 '17 12:11 pixelipo

@theVKC the basic concept you describe is good, yes! Simple interface for the first iteration. :) How do you want to continue - we usually work in pull requests and push our work as early as possible so we can collaborate, collect feedback, and adjust.

(@pixelipo yes, the issue with a separate app is initial overhead and also discoverability later on.)

jancborchardt avatar Nov 22 '17 12:11 jancborchardt

Is there already some progress on this?

chrsch avatar May 26 '18 21:05 chrsch

@chrsch doesn't seem like it – are you up for contributing code, or donating towards the bounty? :) https://www.bountysource.com/issues/45291327-time-tracking

jancborchardt avatar May 31 '18 01:05 jancborchardt

@smatthie the new bounty is at https://www.bountysource.com/issues/45291327-time-tracking – maybe in your Bountysource settings you can withdraw it from the old issue and transfer it? Cause it probably timed out by now (I had that happen for old issues I put a bounty on).

jancborchardt avatar May 31 '18 09:05 jancborchardt

@jancborchardt Thanks - my old bounty hasn't expired, but I'll get it transferred to your new issue. Apparently this has to be done through the bountysource support, so it may take a few days, but I've started the process.

31SFX4 avatar May 31 '18 09:05 31SFX4

Time tracking in Nextcloud would be so great, although I don't think time entries should necessarily be tied to a task. Not everything you do is always related to an issue or a ticket.

Edit: I've just decided to back the bounty on this feature.

basemod avatar Aug 23 '18 15:08 basemod

Hello,

just for the records We started to developing a Toggle like app for NC. The following functions are planned.

Users will be able to: Define/edit/remove/archive - clients Define/edit/remove/archive - projects Define/edit/remove/archive - tags Invite other users to and manage teams created by them leave teams created by others Start recording working sessions on tasks edit/duplicate/remove working sessions on tasks View/export reports about working sessions filtered by specific client/tag/project.

Regards Reiner

reinerj avatar Oct 29 '18 09:10 reinerj

@reinerj where will the tasks for that app be created? How will they be displayed?

pixelipo avatar Oct 29 '18 09:10 pixelipo

current the task will be created inside the app. At a later stage an integration with Deck is planned. This is an initial release plan and more features can come at a later stage. The project was born from our own requirements.

We have other ideas in mind but for the moment we will not take any additional functionalities to this release.

As soon we have something ready to show we will publish it at Gitlab as a project.

reinerj avatar Oct 29 '18 09:10 reinerj

We uploaded the code from the time tracker to Github. When you are interested take a look at https://github.com/mtierltd/time

reinerj avatar Apr 10 '19 19:04 reinerj

Just for the record, I've removed my bounty from Bountysource after they announced a ToS change that stated they would retain the money after a 2 year period. They've withdrawn that ToS change later because of the community backlash. However I won't use their platform anymore as this is a trust thing. I am still following this issue though and as far as I'm concerned the bounty is still up.

basemod avatar Jun 19 '20 07:06 basemod

I installed it in Nextcloud a few days ago and it is great and seems to do generally all I need. My bounty is still there and I am very happy to give it to you, but I can't work out how ... if I understand correctly, you have to request it and then I can approve? Can you do that please? Sorry that I didn't look at it earlier and left it for sooooo long as life got in the way, but of course I want to honour the commitment I made with the bounty.

31SFX4 avatar Nov 05 '20 21:11 31SFX4

I believe it would be relevant to add time tracking features to Nextcloud Tasks directly — as opposed to through a separate app — to reduce fragmentation. This would allow managing task details and time tracking through a single UI, improving user experience.

@raimund-schluessler @juliushaertl It's a shame your fruitful comments didn't lead to any further progress on this, your proposed implementation details perfectly matched my expectations for such a feature.

TristanCottam avatar Mar 01 '24 17:03 TristanCottam

I also consider time tracking a very important feature and would like to contribute if possible. I am very sad as I feel like the Nextcloud team does not really make any efforts to implement this

yuisheaven avatar Mar 04 '24 22:03 yuisheaven