Open declan-morris opened 1 year ago
Thanks for using Tasks.
There is content in your screenshots that is not provided as text for me to copy, so for reasons explained in the following post, I am unable to investigate:
https://publish.obsidian.md/tasks/Support+and+Help/Report+a+Bug
If you can provide full text, and full numbered steps for a reproduction, as per the above, I will willingly have a look when I have time.
Thank you.
You can probably ignore the dataviewjs query as the much simpler example does not work, happy to provide it as well below for completeness.
(No Heading)
rather than Header
as in the callout```dataviewjs
const query = `
not done
path includes ${dv.current().file.path}
# you can add any number of extra Tasks instructions, for example:
group by heading
`;
dv.paragraph('```tasks\n' + query + '\n```');
```
```tasks
not done
path includes Untitled
group by heading
```
> [!todo]- Title
>## Header
>- [ ] Task 1
> - [ ] Sub task
>- [ ] Task 2
@declan-morris I tried this on my side and I confirm the behavior, however this seems to be aligned with what Obsidian and markdown considers a heading - something that starts with #
and not >#
.
You may see on my screenshot that the second heading doesn't appear in the file outline on the right pane of Obsidian.
testfile.md contents:
## header without callout
> ## header with callout
- [ ] #task test task
```tasks
not done
path includes testfile
group by heading
@ilandikov Interesting, yeah you're right it only appears on the Outline when it's outside of a callout.
I expected that it was working correctly as the reader view does seem to understand the different headers as it renders them as headers inside and outside the callout as you can see below.
What would you like to do, close this? Not sure what the expected behavior should be now. Given that obsidian itself seems inconsistent in its interpretation.
Should this instead be a feature request to use the callout title as a psudo header?
Thank you both for the replies...
Firstly, @declan-morris please could you update the summary so that it correctly reflects the information discovered?
It's currently rather non-specific - it would help if it said what was in the call-out - and was more specific than 'does not work'.
Then, let's leave it open for now, as I may write it up in the docs as a known limitation, and this being open will remind me to do so.
It's certainly true that callouts are a corner-case in terms of how Obsidian parses them, compared to simple markdown. They have taken up quite a lot of support time - hence my inclination to just document the limitation.
@declan-morris oh, cool, I actually don't use the reader view, so thanks for this insight. I tried >## header
in https://markdownlivepreview.com and it recognises the header correctly... So I agree that there is an issue somewhere. Maybe the way to go is to open an issue on the Obsidian forum and link it here. When Obsidian team decides what to consider a header or not, Tasks plugin shall follow that.
But the final decision is up to @claremacrae. I'm just proposing ideas =)
Maybe the way to go is to open an issue on the Obsidian forum and link it here. When Obsidian team decides what to consider a header or not, Tasks plugin shall follow that.
If you do go ahead and submit an issue of the forum, please do add a link to it here...
Thanks @claremacrae and @ilandikov.
I've updated the description, tried to make it specific but not too verbose and updated the initial post with a bit more detail.
I've checked the forums and I found this which seems to indicate the same as what we've found here. Happy to create another post if you think this warrants it though.
Thanks - I've tweaked it to make it clear that the heading in the callout is ignored...
One thing you might like to clarify... It says that they go under '(No Heading)' - but that may be because your sample file did not have any earlier heading.
What happens if you put an ordinary (non-callout) heading before your callout... my guess, which I believe was confirmed by ilandikov's example earlier, is that the previous ordinary heading will be applied...
If that's true, a more accurate description would be that the 'previous ordinary heading is used' - in which case, '(No Heading)' is just the ordinary behaviour when there was no earlier heading...
Yeah you're right! The last declared heading outside of the callout does appear to be used. I thought (No Heading) would be useful in the title as that's what I was searching for existing issues with.
Thanks!
Please check that this issue hasn't been reported before.
Expected Behavior
When using the group by in a query, the header should be displayed in the query view if the header is in a callout with the tasks.
Current behaviour
When you query a task that is in a callout and group by header the resulting display shows the header as
No Heading
Steps to reproduce
Which Operating Systems are you using?
Obsidian Version
1.3.4
Tasks Plugin Version
3.8.0
Checks
Possible solution
Potentially use the title of the callout rather than the header in the callout? This could cause issues with multiple headers in a single callout but may be easier to implement? Not sure, it would work for my use case but perhaps not for others.
Update - After discussing with maintainers there appears to be discrepancy with how obsidian itself is interpreting headers.
Outline
view headers are only considered headers when outside of a calloutreading
view headers appear to be considered and rendered as headers as headers both inside and outside of a callSee here for screenshot of this behavior https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1989#issuecomment-1568907333