No description
Find a file
2024-05-10 23:42:28 +04:00
.github/workflows Setting for templates 2024-05-08 00:54:32 +04:00
sample Test vault updates 2024-05-06 21:44:46 +04:00
src Removed attemp to format 2024-05-09 02:24:12 +04:00
.editorconfig Initial upload 2024-03-24 22:27:44 +04:00
.eslintignore Initial upload 2024-03-24 22:27:44 +04:00
.eslintrc Initial upload 2024-03-24 22:27:44 +04:00
.gitignore Initial upload 2024-03-24 22:27:44 +04:00
.npmrc Initial upload 2024-03-24 22:27:44 +04:00
CHANGELOG.md Added a note 2024-05-06 16:42:39 +04:00
esbuild.config.mjs Initial upload 2024-03-24 22:27:44 +04:00
LICENSE Initial upload 2024-03-24 22:27:44 +04:00
manifest.json Initial upload 2024-03-24 22:27:44 +04:00
package-lock.json Bugfix 2024-05-06 23:51:44 +04:00
package.json Bugfix 2024-05-06 23:51:44 +04:00
README.md Template clarification 2024-05-10 23:42:28 +04:00
styles.css Settings visual 2024-05-09 02:10:10 +04:00
tsconfig.json Initial upload 2024-03-24 22:27:44 +04:00
version-bump.mjs Initial upload 2024-03-24 22:27:44 +04:00
versions.json Initial upload 2024-03-24 22:27:44 +04:00

Obsidian Timesheet 🏢 📑

ESLint

It is a plugin for Obsidian designed to generate timesheets for tasks in daily notes.

🙂 How does it work?

I assume you use daily notes to log time you spent on solving tasks which are being tracker in JIRA.

Note

You can track your tasks anywhere else, it's doesn't really matter. I call it JIRA since this software it pretty popular and, what's more important, its functionality, which I should mention, is not too different from similar one in other trackers.

JIRA allows you to create different projects for issues; each project has its unique prefix for issues belong to it. For instance, if the prefix is "FBI", the project has issues like "FBI-1", "FBI-2", etc.

So, a part of your daily note may look like this:

- [ ] 10:00-12:00 Look around and find out what is wrong with the production server (FBI-1)
- [ ] 12:00-16:00 Estimate a feature development (FBI-2)
- [ ] 16:00-18:00 Fix a problem on the production server (FBI-1)

There are three tasks listed, two of which are related to the same JIRA issue. The plugin is able to group and round time you spent on JIRA issues to show you a convenient report. You can use it while attending the next daily meeting or to get quick calculation of spent time to log it in JIRA.

Basically, the only thing you need is to insert a timesheet code block anywhere in the daily note and see something like this:

FBI-1 (4h)

- Look around and find out what is wrong with the production server
- Fix a problem on the production server

FBI-2 (4h)

- Estimate a feature development

You can see more examples in the sample vault.

🤔 Questions

How the plugin finds issue numbers?

To be short, it is considering any sequence "X-Y" as a JIRA task number, if X is a set of capital letters and Y is a number. If you need more details or want to change this behaviour, read the full answer below.

To be certain, the plugin uses patterns you can redefine. Basically, I'm speaking about regular expressions which the plugin applies to each task title to find a task number in it.

Note

I used to think that regular expressions mechanic is a way too complex tool for this plugin, but then I was like "oh, come on, who is going to use this, after all? let's be honest, a nerd like you and you both know how regexps looks like" :)

By default, there is only one pattern which is set in the plugin's settings: [A-Z]+-\d+ ([A-Z]+ here is "one or more capital letters", while \d+ means "any number"). It's enough to catch almost any JIRA issue number.

Tip

Though, it's probably a good idea to set specific patterns for your use case to avoid false positives. For instance I mentioned above it can be FBI-\d+.

There are two ways to define task number patterns. Firstly, you can enlist them right in a timesheet code block (one row — one template). Like this:

```timesheet
FBI-\d+
CLSFD-\d+
```

This will affect only this code block.

You also can do it globally via plugin's settings: have a look at "Default task number patterns". The format is the same: one template per one row. The setting will affect all empty timesheet code blocks.

How can I change how the report renders?

By default the report uses a callout to show you the report. You can change this via plugin's settings; there are four template intended to do it in "Templates" section.

Basically, you can specify the template for header of the whole report, for a task, for a log line, and for the footer. Macros you can use in each one specified directly in the plugin's settings.

                    ← header (can be omitted)
FBI-1 (4h)          ← task
- Roam around       ← task log
- Find out          ← task log
                    ← footer (can be omitted)

Tip

I use JIRA Issue. In its settings, I set "Inline issue prefix" to "JIRA:". It allows me to type "JIRA:FBI-1" and see an active link to JIRA issue FBI-1, including issue' title and actual status.

Then I added the same prefix to my task template for Timesheet:

>
> JIRA:{taskNumber} ({taskDuration})

Voila! Now Timesheet also shows me active links to JIRA instead of plain, boring tasks numbers.