nextcloud / tasks

:white_check_mark: Tasks app for Nextcloud
https://apps.nextcloud.com/apps/tasks
GNU Affero General Public License v3.0
561 stars 95 forks source link

[Feature Request] Time tracking #75

Open Sigi74 opened 7 years ago

Sigi74 commented 7 years ago

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

Creanimo commented 7 years ago

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.

raimund-schluessler commented 6 years ago

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

raimund-schluessler commented 6 years ago

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.

veronica-oldilocks commented 6 years ago

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.

Henni commented 6 years ago

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

veronica-oldilocks commented 6 years ago

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!

jancborchardt commented 6 years ago

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

pixelipo commented 6 years ago

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):

jancborchardt commented 6 years ago

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.

pixelipo commented 6 years ago

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.

raimund-schluessler commented 6 years ago

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

juliushaertl commented 6 years ago

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.

raimund-schluessler commented 6 years ago

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.

31SFX4 commented 6 years ago

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

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.

veronica-oldilocks commented 6 years ago

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:

Am I reading the room correctly? Any thoughts?

pixelipo commented 6 years ago

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

jancborchardt commented 6 years ago

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

chrsch commented 6 years ago

Is there already some progress on this?

jancborchardt commented 6 years ago

@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 commented 6 years ago

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

31SFX4 commented 6 years ago

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

basemod commented 5 years ago

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.

reinerj commented 5 years ago

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

pixelipo commented 5 years ago

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

reinerj commented 5 years ago

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 commented 5 years ago

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

basemod commented 4 years ago

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.

31SFX4 commented 3 years ago

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.

TristanCottam commented 4 months ago

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.

yuisheaven commented 4 months ago

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