Skip to content

Priority markers: '!!!!' is not a NotePlan priority; TaskAutomations p4 writes '>>' - #801

Merged
jgclark merged 1 commit into
mainfrom
priority-markers-follow-up
Dec 4, 2026
Merged

jgclark merged 1 commit into
mainfrom
priority-markers-follow-up

Conversation

@dwertheimer

Copy link
Copy Markdown
Collaborator

@jgclark: your d0ceef321 and 397c06a47 covered almost everything in #797, so I've closed #797. I ran its test cases against main and these are the bits that weren't carried over.

What this changes

  • !!!! is no longer a priority. NotePlan only recognises !, !!, !!! and >>. On main, !!!! task was read as level 4 (the same as >>) for sorting, the Priority section and Wins, and !!!!! task was read as level 5. RE_LEADING_EXCLAMATIONS now matches 1–3 ! only.
  • changePriority() won't write a marker NotePlan doesn't recognise. Given anything other than !, !!, !!!, >> or '', it removes the priority and logs a warning.
  • TaskAutomations no longer writes !!!!. Its overdue review had a "!!!! Set priority to p4" option. That produced a line NotePlan showed with no priority but the Dashboard ranked at 4. The option is gone, and __p4__ now maps to >>. Bumped to 3.2.2.
  • helpers/HTMLView.js priorityClassFromTaskText() now uses getTaskPriority() instead of its own regex, so it follows the same rule. It used to treat a bare !! with nothing after it as a priority.

Your tests that expected !!!! Four to be priority 4 now expect 0, plus a !!!!! Five case and a test for the changePriority('!!!!') guard.

Plugins to rebuild and re-release

The helper changes are bundled into each plugin, so these need a rebuild:

  • jgclark.Dashboard: sorting, the Priority section, Wins and priority cycling. I haven't added a Dashboard changelog line, because 2.6.2 is already tagged and Dashboard 2.7.0: responsive task, reminder and project dialogs #795 also edits the changelog. Add it wherever suits your next release.
  • dwertheimer.TaskAutomations: 3.2.2, with a changelog entry included.
  • Any other plugin that bundles helpers/sorting.js (sortListBy / getNumericPriority) or helpers/HTMLView.js picks up the new !!!! rule on its next build. It only affects lines starting !!!! .

Checks

  • Flow: 0 errors.
  • ESLint: no errors.
  • Jest: helpers paragraph/sorting/HTMLView, jgclark.Dashboard and dwertheimer.TaskAutomations all pass (800 tests).

🤖 Generated with Claude Code

…p4 writes '>>'

Follow-up to d0ceef3 / 397c06a, carrying over the parts of #797 they left out:
- sorting.js: RE_LEADING_EXCLAMATIONS matches 1-3 '!' only, so '!!!! x' is no
  priority (was 4) and '!!!!! x' is no priority (was 5).
- paragraph.js: changePriority() treats a marker NotePlan doesn't recognise as
  "no priority" and logs a warning, instead of writing it.
- HTMLView.js: priorityClassFromTaskText() uses getTaskPriority(), so it follows
  the same rule (it treated a bare '!!' with nothing after it as a priority).
- TaskAutomations: removed the "!!!! Set priority to p4" option; __p4__ maps to
  '>>'. Version 3.2.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jgclark

jgclark commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Aha, thanks.
I saw the !!!! was still allowed, but left it, as I also saw the comment that it is expected by TaskAutomations. Very happy to remove it, now that you confirm you're also wanting to remove it from TA.

@jgclark
jgclark merged commit b765617 into main Dec 4, 2026
4 checks passed
jgclark added a commit that referenced this pull request Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants