github obsidian-tasks-group/obsidian-tasks 4.4.0
4.4.0: custom groups and filters support variables, functions, if and return statements

latest releases: 7.14.0, 7.13.0, 7.12.3...
16 months ago

What's Changed

Please restart Obsidian after updating the plugin. Thank you.

Here are the most notable user-visible changes.

🌟 Features

  • feat: Support variables and more in custom filters and groups by @claremacrae in #2179

The following can now be used in filter by function and group by function:

  • Named variables
  • Functions
  • if statements
  • return

There are some simple examples in the Expressions docs page.

For example, Before:

# 4 places need updating to change from using task.due to, say, task.happens:
group by function (!task.due.moment) ? '%%4%% ==Undated==' : task.due.moment.isBefore(moment(), 'day') ? '%%1%% ==Overdue==' : task.due.moment.isSame(moment(), 'day') ? '%%2%% ==Today==' : '%%3%% ==Future=='

After:

# Only 1 place needs updating to change from using task.due to, say, task.happens:
group by function const date = task.due.moment; return (!date) ? '%%4%% ==Undated==' : date.isBefore(moment(), 'day') ? '%%1%% ==Overdue==' : date.isSame(moment(), 'day') ? '%%2%% ==Today==' : '%%3%% ==Future=='

Full Changelog (including changes too small to note above, and that do not affect the behaviour of the plugin itself):

Don't miss a new obsidian-tasks release

NewReleases is sending notifications on new releases.