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

Support for "duronly" entries. #9

Open
torotil opened this issue May 13, 2015 · 4 comments
Open

Support for "duronly" entries. #9

torotil opened this issue May 13, 2015 · 4 comments

Comments

@torotil
Copy link

torotil commented May 13, 2015

Toggl has a setting that allows users to pause and resume time entries. Those time-entries then don't get a "stop"-time. Due to the filter in this plugin those time entries are ignored even though they are completed.

Currently I'm using a condition like ((!entry["stop"].nil? && !entry["stop"].empty?) || (entry["duronly"] && !entry["duration"].empty?)) to get all the time entries, but I'm unsure whether this is the best approach.

@SkyWriter
Copy link
Owner

When designing this plugin, I tried to make the logic as clear and simple as possible.

The entries are imported once and only once. Ever since that moment they become independent of each other. This approach gives you the following benefits:

  1. You can edit them both in Redmine and in Toggl, and be sure your changes persist.
  2. Since import happens only once, you have no conflicts to resolve. I.e. if the same entry gets changed both in Trello and in Redmine, you don't have to decide which one of them is correct.

Unfortunately this way of dealing with things makes it conceptually impossible to use pause-and-resume Toggl entries, which I too favored before starting to use this plugin.

If you have ideas of another concise algorithm that will allow you to exercise pause-and-resume stuff, I would happily implement it.

@torotil
Copy link
Author

torotil commented May 13, 2015

I see.

I'd propose to always update the time-entries in redmine:

  1. Time entries that are created in redmine won't be touched.
  2. Time entries created in toggl will be updated whenever they are edited in toggl.
  3. Time entries created in toggl and edited in redmine will be overridden. (Toggl "owns" those time-entries).

I think 3. is not such a big issue since users who log time in toggl also tend to edit those entries there. Also editing existing time-entries in redmine is not that common (adding time entries is).

@SkyWriter
Copy link
Owner

What about deletion in Redmine or in Toggl?

Or changing the entries in such a way, that they become disconnected from the tasks or reconnected to different ones?

@torotil
Copy link
Author

torotil commented May 13, 2015

Good points.

  • Deletion in redmine: if possible I'd block edits/deletes from within redmine for all time entries coming from toggl.
  • Deletion in toggl: That one is tricky. I can live with orphaned entries though (a 99%-solution is good enough for me atm).
  • Disconnect / reconnect from tasks: I don't think that's an issue with redmine. The time-entries could be deleted / reassigned to tasks as needed. I guess that's more important than following deletes in toggl - but still not as important as having all the time entries imported in the first place.

Also to avoid syncing "incomplete" time entries the import could be limited to all time-entries started at least X hours in the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants