mirror of
https://github.com/callumalpass/tasknotes.git
synced 2026-07-22 12:50:26 +00:00
fix(#1144): move task filter to per-view in relationships.base
The top-level task filter was excluding non-task files from the Projects view. Since projects can be any file type (not just tasks), the filter is now applied per-view: - Subtasks, Blocked By, Blocking: include task filter (these are tasks) - Projects: no task filter (projects can be any file type) Users with existing relationships.base files should delete and regenerate them to get the fix.
This commit is contained in:
parent
36fa127b2a
commit
dc0ddd08b1
3 changed files with 22 additions and 6 deletions
|
|
@ -74,3 +74,10 @@ Example:
|
|||
- Users who had disabled Bases support in earlier versions could not open Bases views after upgrading
|
||||
- Settings migration now automatically re-enables Bases support since the toggle was removed in V4
|
||||
- Thanks to @MiracleXYZ for reporting
|
||||
|
||||
- (#1144) Fixed relationships.base showing empty views for Projects, Blocked By, and Blocking tabs
|
||||
- The top-level task filter was excluding non-task files from the Projects view
|
||||
- Projects can be any file type (not just tasks), so the filter is now applied per-view
|
||||
- Subtasks, Blocked By, and Blocking views retain the task filter; Projects view does not
|
||||
- Users with existing relationships.base files should delete and regenerate them to get the fix
|
||||
- Thanks to @needo37 for reporting, and @n1njaznutz, @nestor50, and @IvyDliu for investigating and confirming the solution
|
||||
|
|
|
|||
|
|
@ -522,15 +522,16 @@ Used by the **Relationships widget** to display task relationships (subtasks, pr
|
|||
|
||||
This template uses the special `this` object to reference the current file's properties, enabling dynamic relationship queries.
|
||||
|
||||
Note: Unlike other templates, this one does not have a top-level task filter. Each view applies filters as appropriate:
|
||||
|
||||
- **Subtasks, Blocked By, Blocking**: Include the task filter (these views show tasks)
|
||||
- **Projects**: No task filter (project files can be any file type, not just tasks)
|
||||
|
||||
```yaml
|
||||
# Relationships
|
||||
# This view shows all relationships for the current file
|
||||
# Dynamically shows/hides tabs based on available data
|
||||
|
||||
filters:
|
||||
and:
|
||||
- file.hasTag("task")
|
||||
|
||||
formulas:
|
||||
# ... same formulas as Mini Calendar above ...
|
||||
|
||||
|
|
@ -539,6 +540,7 @@ views:
|
|||
name: "Subtasks"
|
||||
filters:
|
||||
and:
|
||||
- file.hasTag("task")
|
||||
- note.projects.contains(this.file.asLink())
|
||||
order:
|
||||
- status
|
||||
|
|
@ -576,6 +578,7 @@ views:
|
|||
name: "Blocked By"
|
||||
filters:
|
||||
and:
|
||||
- file.hasTag("task")
|
||||
- list(this.note.blockedBy).map(value.uid).contains(file.asLink())
|
||||
order:
|
||||
- status
|
||||
|
|
@ -593,6 +596,7 @@ views:
|
|||
name: "Blocking"
|
||||
filters:
|
||||
and:
|
||||
- file.hasTag("task")
|
||||
- list(note.blockedBy).map(value.uid).contains(this.file.asLink())
|
||||
order:
|
||||
- status
|
||||
|
|
|
|||
|
|
@ -674,12 +674,14 @@ ${orderYaml}
|
|||
const blockedByProperty = getPropertyName(mapPropertyToBasesProperty('blockedBy', plugin));
|
||||
const statusProperty = getPropertyName(mapPropertyToBasesProperty('status', plugin));
|
||||
|
||||
// Note: No top-level task filter here. Each view applies filters as needed:
|
||||
// - Subtasks, Blocked By, Blocking: include task filter (these are tasks)
|
||||
// - Projects: no task filter (projects can be any file type, not just tasks)
|
||||
|
||||
return `# Relationships
|
||||
# This view shows all relationships for the current file
|
||||
# Dynamically shows/hides tabs based on available data
|
||||
|
||||
${formatFilterAsYAML([taskFilterCondition])}
|
||||
|
||||
${formulasSection}
|
||||
|
||||
views:
|
||||
|
|
@ -687,6 +689,7 @@ views:
|
|||
name: "Subtasks"
|
||||
filters:
|
||||
and:
|
||||
- ${taskFilterCondition}
|
||||
- note.${projectsProperty}.contains(this.file.asLink())
|
||||
order:
|
||||
${orderYaml}
|
||||
|
|
@ -704,6 +707,7 @@ ${orderYaml}
|
|||
name: "Blocked By"
|
||||
filters:
|
||||
and:
|
||||
- ${taskFilterCondition}
|
||||
- list(this.note.${blockedByProperty}).map(value.uid).contains(file.asLink())
|
||||
order:
|
||||
${orderYaml}
|
||||
|
|
@ -711,6 +715,7 @@ ${orderYaml}
|
|||
name: "Blocking"
|
||||
filters:
|
||||
and:
|
||||
- ${taskFilterCondition}
|
||||
- list(note.${blockedByProperty}).map(value.uid).contains(this.file.asLink())
|
||||
order:
|
||||
${orderYaml}
|
||||
|
|
|
|||
Loading…
Reference in a new issue