Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Urgency doesn't take into account priority #1795

Closed
3 of 7 tasks
zaphodb2002 opened this issue Mar 23, 2023 · 6 comments
Closed
3 of 7 tasks

Urgency doesn't take into account priority #1795

zaphodb2002 opened this issue Mar 23, 2023 · 6 comments
Labels
type: bug Something isn't working type: no action needed Conclusion of the discussion was that no changes to Tasks are required

Comments

@zaphodb2002
Copy link

Please check that this issue hasn't been reported before.

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

Tasks with higher priority should be receiving more urgency according to the documentation.

Current behaviour

If I make 4 tasks, no dates, and set each to a different priority, they are all assigned the same urgency (1.95) as if they had no priority.

Steps to reproduce

Add the following content to a file titled "Test":

- [ ] 🔽 Totally unimportant thing
- [ ] ⏫ Thing
- [ ] 🔼 Less important thing
- [ ] Even Less Important Thing


```tasks
path includes Test
show urgency

All tasks will show 1.95 urgency.

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version

1.1.16

Tasks Plugin Version

2.0.0

Checks

  • I have tried it with all other plugins disabled and the error still occurs

Possible solution

I'll pull the source and see if I can fix this. I see in Urgency.ts that it should be assigning the priority correctly but the switch statement has no default, so if the priority isn't reading correctly you'd never know. First step is to get an error catch in there for when it's not one of the expected values, then figure out why it's not.

@zaphodb2002 zaphodb2002 added the type: bug Something isn't working label Mar 23, 2023
@claremacrae
Copy link
Collaborator

claremacrae commented Mar 23, 2023

Hi, you haven't shown a screenshot, but I can see what is going on.

Seeing the problem

If, in your Tasks results, you click the Edit /pencil icon, you will see that none of your tasks has a priority value, and that the icons appear at the start of the description.

Please see this section in the docs for the reason why:

https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/auto-suggest/#what-do-i-need-to-know-about-the-order-of-items-in-a-task

Fixing your tasks

If you move the Priority icons to after the descriptive text, the priorities will be loaded and the scores will differ, as documented in the table in:

https://obsidian-tasks-group.github.io/obsidian-tasks/advanced/urgency/#how-urgency-is-calculated

@claremacrae claremacrae added the type: no action needed Conclusion of the discussion was that no changes to Tasks are required label Mar 23, 2023
@claremacrae
Copy link
Collaborator

No action is needed, Tasks is behaving as currently intended - and as documented.

@zaphodb2002
Copy link
Author

@claremacrae For future reference, this is the same as issue #1505 , yes? I'll go take a look at that one.

@claremacrae
Copy link
Collaborator

@claremacrae For future reference, this is the same as issue #1505 , yes? I'll go take a look at that one.

Thank you... Yes, that's the one. I'm not sure if you're thinking of working on that, but I'll reply over in that issue, anyway...

@zaphodb2002
Copy link
Author

@claremacrae thanks, just wanted to make sure there was a link here to that in case someone else found this ticket looking for my issue. I will indeed see what I can do about that other issue.

@claremacrae
Copy link
Collaborator

So I will close this one, as it adds no actions above what you have already identified in #1505.

@claremacrae claremacrae closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: no action needed Conclusion of the discussion was that no changes to Tasks are required
Projects
None yet
Development

No branches or pull requests

2 participants