Plugin: Time Slip (time tracker) [v1.0.2, 2024-11-12]

:stopwatch: Time Slip

Time Slip is a simple time tracker plugin.

Features

  • Run multiple concurrent timers and manage multiple time logs
  • Sync completed and running tasks across devices (including mobile)
  • Display summaries by date ranges, and aggregated by task, project, or note
  • Logs are saved in Joplin notes in a simple-to-export, editable CSV format

time-slip2

Usage

  1. Create a new note and tag it with time-slip.
  2. Make sure that the note is selected in the Time Slip panel (you may need to switch to a different note first).
  3. Start a new timer by filling the task and project fields, and clicking the Start button. You may start multiple timers.
  4. Click the Stop button to stop the timer.
  5. The time log contains a table with entries for each ongoing or completed timer.
    • Edit the note to change any of the fields.
    • Select the default order of the log entries in the settings. You may also activate auto-sorting, so that edited entries are automatically resorted (or resort using Tools -> Sort Time Slip log).
    • Insert the table into a note (or replace selection) using Note -> Insert Time Slip markdown log.
    • Import a markdown table by selecting the table and clicking Tools -> Convert selected table to CSV.
  6. The panel displays a summary of completed timers.
    • Only entries in the selected date range are displayed.
    • Change the aggregation level by selecting task, project, or note.
    • Sort the table by clicking on the column headers.
    • Further filter the table using the search bar.
    • Insert the table into a note (or replace selection) using Note -> Insert Time Slip markdown summary.
    • Copy the table to clipboard using Tools -> Copy Time Slip CSV summary.
12 Likes

Wow! What a cool thing. Thank you for making this.

1 Like

That's amazing, I've been meaning to create such a plugin but never got the time. Thanks for sharing it!

3 Likes

I just gave it a try and it works nicely, it's very easy to use and intuitive.

Only thing I'm wondering are these two dates that seem to be hardcoded to 09/09/2024 and 16/09/2024 - what are they for? It seems I can ignore them to create tasks and start/stop them

1 Like

Thanks @laurent! Hope that you'll find it useful.

What they do basically is

They default to X days before today (there's a setting for X, the default is 7), and can be edited in the widget to slice the summaries of completed tasks (in the selected note) to a given range. I think that they actually add an extra day, which I may need to fix.

1 Like

v0.2.0

  • added: summary aggregation by task, project or note
  • added: summary filtering by free text
  • added: when edits are made to the selected time note, duration is recalculated automatically
  • added: more flexible CSV format based on column names
    • example: one could import Toggl exports by pasting the CSV into a note (after removing quotation marks from the CSV)
  • added: tooltips
  • fixed: correct number of days in date range (one less)
  • improved: UI responsiveness
3 Likes

Hi @shikuz The plugin is awesome, extremely simple, and provides the information we need to track the time spent on tasks without using any external tools. Thank you!!!!
As a simpler user, I hope you don't mind if I suggest a few improvements that might be useful if you have the opportunity to think to implement them:

  1. Add a menu option to hide the time tracker panel when this functionality is not in use.
  2. To create a Markdown table format:
    a. Replace commas (,) with bars (|).
    b. Add bars (|) at the start and end of each row.
    c. Insert an additional row of dashes between the title and the data: |-----|.
    Example:

' | Project | Task | Start date | Start time | End date | End time | Duration |
|----------|-------|------------|------------|------------|----------|----------|
| Project1 | Task1 | 2024-09-19 | 15:36:11 | 2024-09-19 | 15:36:44 | 00:00:33 |'

This would help render the information as a visually appealing table.
3. Changes to a CVS format
If needed, we can use the find and replace function to change the bars (|) to commas (,) for CSV export. Eventually, adding a button to automate this change easier or switching between Markdown Table format and CSV format, and vice versa.

2 Likes

Thanks @Eduardo ! Appreciate the feedback.

Good idea, thanks! I'll add this command to a menu in the next release. For now, there is already a registered command called "Toggle Time Slip panel" that you can access using Cmd/Ctrl+Shift+P.

EDIT: Released v0.2.1 with the command added to the View menu.

I understand the appeal of a Markdown table. I'll explain the design decision to use CSV. I'd argue that CSV to data tables is like Markdown to notes. There is no need to export a note (in the sense that it requires processing or formatting) for the information to be accessible anywhere else. At the same time, it is also human readable and editable, even though many users prefer Rich Text editing to raw Markdown editing. CSV is similar in that sense (at the very least, this is probably the most standard text-based format). Therefore, in this specific context, I see a Markdown table as an export, or rather rendering, of the CSV and not the other way around. :slight_smile:

Given that CSV is the native format, and Markdown is the rendered output, I see two possible approaches. The first is already available in Joplin in the form of the Paste Special Plugin. Essentially you can render any CSV, including Time Slip notes, as Markdown tables automatically (see video below). The second, is to have a Markdown-it plugin that renders CSV as a table in the preview pane.

As there is already an implemented solution for this I see this as out of scope for the plugin, but I may change my mind. It's still very new. :baby:

time-slip-render

1 Like

Regarding the first point, I wasn't aware of the alternative way to hide the panel. Thanks
For me, using Ctrl+Shift+P to hide the panel when it's not in use is enough.

Relate to the second point, I understand and agree with your perspective. My suggestion was that even using a markdown editor with the help of additional plugins is more readable for me to check and analyze time spent.

Also, thanks to another plugin that allows sorting tables in the second pane would be useful as well.
But you're right, using a plugin to copy/paste CSV into a Markdown table is enough to make the output more readable when I need to check it.
Thanks a lot for your guidance.

1 Like

Great plugin, man, thank you! There was something slightly hard to understand: it's about that all stuff located below the running tasks list - is a statistic's or summary relating stuff. At first, I tried to switch task-project-note while adding my first task, wondering why it doesn't have any effect on the task being added. It seems like here is missed "Stats by:" before the Task-Project-Note selector. Or some kind of logical delimiter.
And, please, add somewhere a short instruction: to bring the plugin to work, you should create an empty note and tag it by the "time-slip" tag.

1 Like

Thanks @HiBing0, it's hard to anticipate what will be missed by a new user, so thanks for the feedback. I hoped that the short screen capture tutorial will make things easier. I tried to avoid large titles or things that will take up too much space, but perhaps a dividing bar will make the separation between the two regions of the panel clearer? Or perhaps displaying completed tasks-related elements only when there are completed tasks? (They will not be shown when you start the plugin for the first time.) I was hoping that the already existing elements will help with orientation: (1) Tooltips for the date inputs and slider (see image). (2) When you open the plugin for the first time, it says "Tag a note with a time-slip tag" (see image, I'll make the sentence a little longer and explicit). (3) All elements that refer to completed tasks are grouped at the bottom. In any case, I'll add a short text that explains how to start using the plugin.

EDIT: v0.2.3 (released now) tries to address these comments.

2 Likes

Change log for recent releases:

v0.2.4

  • added: open note button
  • improved: filter tasks by start time only
    • example: if a task started on Monday and ended on Tuesday, it will be counted towards Monday's sum of hours, but not Tuesday's, to avoid the appearance of being counted twice
  • fixed: single message sent from panel when starting a completed task

v0.2.3

  • added: section divider
  • improved: hide aggregation slider when no tasks
  • improved: init note selection message

v0.2.2

  • fixed plugin manifest

v0.2.1

  • added: toggle panel command in the View menu
1 Like

Thanks for your contribution, @shikuz!

Unfortunately, I'm struggling to use the plugin - I'm always getting a red message "Please select a note first".

  • I have a note selected, active. It has a time-slip tag
  • I add a "Task name", as well as a "Project name" and click "Start"
  • The error message appears
  • The task name and project name I entered are cleared

image

I do have a lot of plugins installed, many are inactive - please see below for plugin list, versions - however my Joplin is generally quite stable. I'm using the Detailed note list style, I tried with Compact as well.

The screenshot below shows I have a note, with the time-slip tag.

Your help would be much appreciated. Hopefully I'm just missing something obvious, but also, I hope it's not too obvious!

Joplin 3.1.17 (prod, linux)

Client ID: 946a3090dd6d46b9820ef8a35b248c40
Sync Version: 3
Profile Version: 47
Keychain Supported: Yes

Revision: 3ea403d

Admonition markdown extension: 1.1.0
AlertsPerfect: 1.0.1
Automatic Backlinks to note: 3.0.3
Backup: 1.4.2
CodePerfect: 1.0.2
Delete unlinked resources: 1.0.0
Emoji: 1.0.4
Extra Markdown editor settings: 1.4.1
Extra Markdown viewer settings: 0.4.0
Google Fonts Plugin: 1.0.0
Home Note: 2.0.0
Inline tags: 1.3.0
Kminder Mindmap: 0.8.6
Make All Links: 1.0.3
Note Link System: 0.8.0
Note list (Preview): 1.1.0
Note Tabs: 1.4.0
Paragraph Extractor: 1.1.5
Plugin Bundle: 0.5.5
Quick HTML tags: 0.2.0
Spoilers: 1.0.6
Templates: 2.4.0
Text Colorize: 1.2.5
Time Slip: 0.2.4
URL Meta: 1.0.7
VS-Code Style Note Search: 0.0.1
YesYouKan: 1.0.3

Hi @ncatanchin, let's try the following:

  1. Please verify that in your Time Slip settings you have Log note tag set to time-slip.
  2. After creating the note, setting its title, and tagging it with time-slip, please switch to any other note.

If all goes well, it should appear on the Time Slip panel and selected by default. Then, you should be able to enter new tasks.

No luck!

image

Nothing showing up in Time Slip panel (no change) after following your instructions.

I will be installing a clean Joplin on another machine later this evening, I'll give it a shot without other plugins that might be conflicting, otherwise, if there's anything further you think I should try, please let me know.

Thanks

I'm using a number of plugins without fault, but we don't have many plugins in common, so there might be a conflict with one of them (hard to imagine one, but it's possible). could you try to enable debugging and check for any time-slip related errors?

Hi. As more records I add I see a necessity of "order by" feature. It could be a plugin settings option or in form of clickable table columns names. It seems the records of particular date range displayed as if they were an result of SQL query without 'order by' clause - in unpredictable order. For now I have record1, record2, and so on of the same Project, were created sequentially by date, but displayed as record2, record4, record3, record1.
To be honest, I slightly corrected some records, inside the note, the ones - accidentally, and the ones - to change a bit the endtime's time. So maybe there is another invisible to me field (e.g. Modified) the records ordered by, I don't know this. At the same time, I saw that it is better not to make such changes, especially by deleting, for example, time digits, and then adding the necessary ones. In such way we can easily catch an error, cos the Duration recalculates continuously. But it is better to first select digits, and then insert the necessary ones in the same place, preserving field structure.
I've checked again: my records names and dates have the same order, record1,2,3,4 have corresponding ascending dates, but they displayed as I wrote earlier, unordered.

Hi @HiBing0, I completely agree. In fact it has already been implemented, including a dedicated setting (sort by duration, end time or name) and suppoorting clicks on the table header. it will be part of v0.3.0 once it's released.

the current order is by the total duration of the task or project.

1 Like

v0.3.0

  • added: sort completed tasks by duration, end time or name
  • fixed: memory leak
  • improved: sorted autocomplete
  • improved: debounce updates on note change

Couple of things to update you on regarding this issue:

  1. Fresh install of Joplin v3.1.17, same OS - Ubuntu 24.10 - no plugins other than Time Slip, everything worked as expected

  2. When the plugin is using postMessage for iframe communications, there is no note being returned, eg. for updateLogNotes:

{
    "message": {
        "name": "updateLogNotes",
        "notes": []
    }
}