Giter VIP home page Giter VIP logo

obsidian-tasks-x's Introduction

Obsidian Tasks SQL Powered

Task management for the Obsidian knowledge base. With SQL Powers

Version Contributors Forks Stargazers Issues MIT License Downloads

This is a fork of the Tasks plugin for obsidian and will be kept in sync with it where possible. This for provides extended query capabilities and long term should be merged back into the main plugin. Until then enjoy the power of SQL.

Here are some examples of what can be done with this plugin:

  • WHERE status->indicator = ' ' AND moment()->[format]('YYYY-MM-DD') = moment(dueDate)->[format]('YYYY-MM-DD')
  • WHERE status->indicator = ' ' AND moment(dueDate)->isBetween(moment()->startOf('day').subtract(1, 'days'), moment()->startOf('day').add(14, 'days'))
  • WHERE status->indicator = 'x' AND precedingHeader LIKE '%tasks%'
  • WHERE status->indicator = ' ' AND moment(dueDate)->[format]('YYYY-MM-DD') = '2021-04-09' AND path LIKE '%GitHub%'
  • WHERE description LIKE '%waiting%' OR description LIKE '%waits%' OR description LIKE '%wartet%'

And much much more is possible, go explore and share!

Track tasks across your entire vault. Query them and mark them as done wherever you want. Supports due dates, recurring tasks (repetition), done dates, sub-set of checklist items, and filtering.

You can toggle the task status in any view or query and it will update the source file.


For changes in each release, please check the releases page: https://github.com/sytone/obsidian-tasks-x/releases


Screenshots

ACME Tasks The ACME note has some tasks.

Important Project Tasks The Important Project note also has some tasks.

Tasks Queries The Tasks note gathers all tasks from the vault and displays them using queries.

Create or Edit Modal The Tasks: Create or edit command helps you when editing a task.

Installation

Follow the steps below to install Tasks.

Note: The request to have it added is still pending. Use BRAT for the moment.

  1. Search for "Tasks SQL Powered" in Obsidian's community plugins browser
  2. Enable the plugin in your Obsidian settings (find "Tasks SQL Powered" under "Community plugins").
  3. Check the settings. It makes sense to set the global filter early on (if you want one).
  4. Replace the "Toggle checklist status" hotkey with "Tasks: Toggle Done".
    • I recommend you remove the original toggle hotkey and set the "Tasks" toggle to Ctrl + Enter (or Cmd + Enter on a mac).

From BRAT

To install a pre-release, download and enable the Obsidian42 BRAT plugin, add the beta repository sytone/obsidian-tasks-x, and then have BRAT check for updates.

Then..

  1. Enable the plugin in your Obsidian settings (find "Tasks SQL Powered" under "Community plugins").
  2. Check the settings. It makes sense to set the global filter early on (if you want one).
  3. Replace the "Toggle checklist status" hotkey with "Tasks: Toggle Done".
    • I recommend you remove the original toggle hotkey and set the "Tasks" toggle to Ctrl + Enter (or Cmd + Enter on a mac).

Manual installation

  1. Download the latest release
  2. Extract the obsidian-tasks-x-plugin folder from the zip to your vault's plugins folder: {vault}/.obsidian/plugins/ Note: On some machines the .obsidian folder may be hidden. On MacOS you should be able to press Command+Shift+Dot to show the folder in Finder.
  3. Reload Obsidian
  4. If prompted about Safe Mode, you can disable safe mode and enable the plugin.

Then..

  1. Enable the plugin in your Obsidian settings (find "Tasks SQL Powered" under "Community plugins").
  2. Check the settings. It makes sense to set the global filter early on (if you want one).
  3. Replace the "Toggle checklist status" hotkey with "Tasks: Toggle Done".
    • I recommend you remove the original toggle hotkey and set the "Tasks" toggle to Ctrl + Enter (or Cmd + Enter on a mac).

User Documentation

For user documentation, please check https://sytone.github.io/obsidian-tasks-x/.

Development

Clone the repository, run yarn to install the dependencies, and run yarn dev to compile the plugin and watch file changes.

Donations

The plugin is completely free to use. If you love it very much and want to pay it forward, please consider donating to an organization of your choice. Two example organizations that you could consider donating to are the Wikimedia Foundation and the Electronic Frontiers Foundation:

  1. Support the Wikimedia Foundation
  2. Support EFF

obsidian-tasks-x's People

Contributors

andreyakinshin avatar chuckthenerd avatar claremacrae avatar dependabot[bot] avatar imeed166 avatar jan-willi avatar jobullen avatar klaudioz avatar kongolan avatar liambresnahan avatar masstronaut avatar mauleb avatar nikhilramolla avatar nothingislost avatar olearycrew avatar philphilphil avatar pistolpeter avatar rdimaio avatar robinniemann avatar schemar avatar skn0tt avatar skoch avatar sytone avatar taitava avatar thakichowdhury avatar tiktuk avatar tymox64 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

wanxp claremacrae

obsidian-tasks-x's Issues

Editing/Adding Custom Task Types Not Saving

Expected Behavior

Tasks status types should save when changed/added

Current Behavior

Changing the "next status symbol" field is not saving.

Steps to Reproduce

  • Change the "next status symbol" field in one of the task types.
  • Close the settings
  • Reopen settings
  • Field has reverted to x

CleanShot 2022-06-01 at 21 41 37

Context (Environment)

  • Obsidian version: 0.14.15
  • Tasks version: 2.0.11
  • [-] I have tried it with all other plugins disabled and the error still occurs

Possible Solution

Fix updateStatusSetting()

CleanShot 2022-06-01 at 22 10 23@2x

BRAT reports main.js missing from v2.0.13 release

In case you aren't aware...

Expected Behavior

Plugin can be installed from BRAT

Current Behavior

Error message about 'main.js missing from release'

image

Steps to Reproduce

Ask BRAT to load sytone/obsidian-tasks-x

Context (Environment)

  • Obsidian version:
  • Tasks version: not relevant - the current obsidian-tasks-x release is v2.0.13
  • I have tried it with all other plugins disabled and the error still occurs

Command palette freezing app with tasks-x enabled

Issue tracker is ONLY used for reporting bugs. New feature ideas should be discussed in the ideas section. Please use the Q&A section for supporting issues. Please use the search function.

If you encountered the issue after you installed, updated, or reloaded the tasks plugin, please try restarting obsidian before reporting the bug.

If you want to report a bug, please follow the guide lines below to help me resolve it.

Expected Behavior

cmd-p should open the command palette

Current Behavior

command-p seems to freeze the entire app for about a minute and spikes the cpu to 100%. When it finally comes back the console logs this:

[20220530 08:43:33][SILLY] [Command:debug-export-tasks] Checking if command is available.,[object Object],[object Object] plugin:obsidian-tasks-x-plugin:176

Steps to Reproduce

In my current setup it's just hitting cmd-p or clicking the command palette.

Context (Environment)

  • Obsidian version: 0.14.5
  • Tasks version: 2.0.6
  • [-] I have tried it with all other plugins disabled and the error still occurs

In my vault with lots of plugins this was happening every time. In a new vault with only BRAT, this plugin, and minimal theme it seemed ok. Not too sure what could be conflicting with it, but the regular tasks plugin works fine in my vault. Let me know if there's anything I can do to help narrow it down. I'm super excited to try your version out.

Created Date appearing Twice

Issue tracker is ONLY used for reporting bugs. New feature ideas should be discussed in the ideas section. Please use the Q&A section for supporting issues. Please use the search function.

If you encountered the issue after you installed, updated, or reloaded the tasks plugin, please try restarting obsidian before reporting the bug.

If you want to report a bug, please follow the guide lines below to help me resolve it.

Expected Behavior

The ➕DATE should appear only once when this date is added

Current Behavior

In the case a task does not have a created date (pre-existing ones), then the current date is shows.

image

When a task already had a created date (added manually before installing the plugin) then two dates are shown (as in the screenshot)
image

Context (Environment)

  • Obsidian version: v. 0.15.3
  • Tasks version: 2.6.1
  • I have tried it with all other plugins disabled and the error still occurs

Possible Solution

Links to web pages and formatting are not rendered in tasks when in Reading mode

Expected Behavior

All Markdown in task lines is rendered in Reading mode.

Current Behavior

Only task lines that contain both [[ and ]] are rendered in Reading mode.

Steps to Reproduce

Create the following tasks

- [ ] I link to [[README]]
- [ ] I link to a web page [BBC](https://www.bbc.co.uk)
- [ ] I have some **formatting** and *more formatting*

View them in Reading mode the original Tasks plugin and you see:

image

View them in Reading mode in Tasks-x and you see:

image

Context (Environment)

  • Obsidian version: 0.15.9
  • Tasks-s version: 2.7.0
  • I have tried it with all other plugins disabled and the error still occurs I am using the plugins that are enabled in the tasks-x vault, as downloaded from the 2.7.0 release page.

Possible Solution

I was prompted to test this out after reading this code:

// If there is no links then just set span to text, saves a ms or so per item.
if (taskAsString.indexOf('[[') != -1 && taskAsString.indexOf(']]') != -1) {
await MarkdownRenderer.renderMarkdown(taskAsString, textSpan, this.path, null as unknown as Component);
} else {
textSpan.textContent = taskAsString;
}

It looks to me like it makes the assumption that only wiki links need to be rendered, which is consistent with the behaviour noted above.

Completing a task does not add a Done date

I was excited to try out the new Tasks Status Types. Thank you for working on these.

Expected Behavior

Installing this plugin and accepting its default settings, I would expect that clicking in the Task's checkbox would mark the task as done and add the Done date.

Current Behavior

Instead of change [ ] to [x] it changes to [/], which the settings say is 'In Progress'. And it therefore does not add the Done date, regardless of whether the user enabled that field or not.

It looks like it is a completed task, but it actually is not.

Problems with this behaviour include:

  • It seems to silently impose on the user the requirement to install special styling to show the in-progress tasks - possibly even imposing Minimal or ITS Themes?
  • It's a change in behaviour when the plugin says it's intended to be backwards-compatible with Tasks.

Steps to Reproduce

  • Install v2.4.2 of this plugin
  • Create a task e.g. - [ ] Do stuff
  • Switch to Reading mode
  • Click on the task's check box

Result is: - [/] Do Stuff

Context (Environment)

  • Obsidian version: 0.15.2
  • Tasks-X version: 2.4.2
  • I have tried it with all other plugins disabled and the error still occurs

Possible Solution

  • Change the default states to be as per the current Obsidian and Tasks plugin defaults, namely [ ] and [x] only
  • And make it easy to add the 'In progress' state in the settings, for those who would like this feature

Not honoring tags, comments in task description

Issue tracker is ONLY used for reporting bugs. New feature ideas should be discussed in the ideas section. Please use the Q&A section for supporting issues. Please use the search function.

If you encountered the issue after you installed, updated, or reloaded the tasks plugin, please try restarting obsidian before reporting the bug.

If you want to report a bug, please follow the guide lines below to help me resolve it.

Expected Behavior

Original Tasks plugin hides comments in reading view and enables tags as normal

Current Behavior

tags and comments are displayed as normal text

Steps to Reproduce

n/a

Context (Environment)

  • Obsidian version: 0.15.6 but behaviour observed in previous versions
  • Tasks version:
  • I have tried it with all other plugins disabled and the error still occurs

Possible Solution

'not done' filter returning all statuses

Using the 'not done' filter does not filter out 'done' tasks

For these tasks:

  • This is a task 1
  • This is a task 2 (done)

And this code block:

CleanShot 2022-06-24 at 17 18 50@2x

Yields attached result
CleanShot 2022-06-24 at 17 16 01@2x

As this moves into the tasks plugin, what about....

thanks for the work/effort on moving this into the tasks plugin. I had a thought about a derivative of the code you have. You've figured out how to get the sql code into obsidian, but what if you allowed it to work on queries of an sqlite database in the vault. Idea is that I have an sqlite database and want to be able to access / do queries in obsidian.

Example: I have a csv file that I exported from outlook that is an address book. I have it converted to an sqlite database and can use a python program called visidata to access. But I'd love to be able to use SQL in obsidian to handle this as an embedded address book

Task auto checkmark after due date pass

Is it possible that it can check the task as done after it passes the due date? I have some recurring tasks that I wanna do at a specific time but if the time passes then that task becomes irrelevant to me even if I haven't done the task. So I am looking for an option for some specific tasks (if possible) to set as auto-complete if the due date passes. And thanks for making this amazing plugin.

Looking forward to your reply😊

Task Creation/Editing Modal Not Working

Expected Behavior

Create/edit task modal should work

Current Behavior

CleanShot 2022-06-01 at 22 07 27

Currently the modal opens, but the date fields aren't parsing and the task can't be saved. The modal can only be dismissed by clicking the close icon or hitting escape.

Steps to Reproduce

Open the modal using the command to create/edit a task. When creating a new task the form can be tabbed through, but the fields don't seem to be active. The date fields don't parse when typing, clicking the apply button doesn't do anything, hitting return does nothing.

CleanShot 2022-06-01 at 22 10 47@2x

Context (Environment)

  • Obsidian version: 0.14.15
  • Tasks version: 2.0.11
  • I have tried it with all other plugins disabled and the error still occurs

After merge of Tasks 1.9.0 code, tasks results will not refresh if users edit tasks-x specific fields in Task object

Summary

  • If you have added any fields to Task in your fork (like date created) ...
  • ... and you merge any post 1.9.0 Tasks code in to your fork ...
  • ... as things currently stand, if a user edits a task and changes a value of one of those new fields ...
  • ... then any tasks code blocks (and probably SQL code blocks) in any active files will not be refreshed.

More info below.

Background

This is to expand on my message in Discord on 2022-07-18

@sytone please don’t merge 1.9.0 to your fork yet. I need to generalise one of the performance fixes so that it works when there are more values in a Task (like your Added field). Will let you know when it’s ready.

If you merge now, user task blocks won’t be updated if they edit or add Added values…

The context is PR #894 in obsidian-tasks.

That PR describes thoroughly the intention of the change.

The specific code

And these new chunks of code:

Task.identicalTo():

obsidian-tasks/Task.ts at cad0391d2a3267eb3682a012d2dded3c0f0e4c98 · obsidian-tasks-group/obsidian-tasks · GitHub

Task.test.ts - 'identicalTo'

obsidian-tasks/Task.test.ts at cad0391d2a3267eb3682a012d2dded3c0f0e4c98 · obsidian-tasks-group/obsidian-tasks · GitHub

Action required

  1. Either your fork of Task.identicalTo() needs to be edited to add checks (and tests, of course) for any new fields you have added
  2. Or the existing Task.identicalTo() needs to re-implemented so that it checks all fields in Task, recognises their type, and applies the correct identity-check.

Reasoning: as schemar noted in this code review comment:

perf: Stop many non-task edits triggering a redraw of all active tasks blocks by claremacrae · Pull Request #894 · obsidian-tasks-group/obsidian-tasks · GitHub

The challenge with this implementation (Task.identicalTo()) is that you now need to remember to update it if you change the structure of a task. For example when you add a new field to it.

It's especially difficult to remember, as all the date fields are declared further down and not necessarily visible when looking at the function head.

Is there good documentation on what to do to add a new field to Task? (or possibly other modifications)
Could there be a way where you iterate over the properties of the objects (e.g. Object.keys()) and compare based on the type of the value at runtime (e.g. instanceof)?

If this is not possible, maybe document here why it isn't possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.