Tell pre-resume extensions when a call is a draft save
Maintainers usually reply within 1 day
@chathura-de-silva is already working on this.
Since Oct 21, 2026.
Assessment
This issue has not been assessed yet.
Description
Current Limitation
Extensions are generic, but PRE_RESUME extensions can't tell a draft save from a submission unless the host marks it for them. SaveDraft only sets __command to the step's draft command, and that can't be the signal: a normal submission through CompleteTaskStep can name the same command. A host that marks drafts itself (as nsw-srilanka's draft handler does for its payload schema extension) ties that extension to the host instead of to core.
Suggested Improvement
SaveDraft tags the context it passes to the pre-resume extensions, for example with extensions.WithDraft(ctx), and extensions check extensions.IsDraft(ctx). CompleteTaskStep never sets it, so an extension can rely on it whatever command the payload names.
Version
b3521096e55b
Additional Context
This was raised in the review of OpenNSW/nsw-srilanka#821. Once this is released, nsw-srilanka's payload schema extension will switch to extensions.IsDraft, and the handler's marker will be removed. The read-only and undeclared-field checks (OpenNSW/nsw-srilanka#795, OpenNSW/nsw-srilanka#796) need the same signal.
- Dominant language
- Go
- Stars
- 6
- Forks
- 8
- Avg merge
- 21h 36m
- Merged PRs (30d)
- 42
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenNSW/core
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
payment: test fixtures hardcode real gateway names (govpay/lankapay) instead of generic placeholdersOpen
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
nsw-sl cleanup Type/Improvement
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
remote: let the host inject a logger, and log with one consistent policyPossibly taken @mushrafmim claimed this 5 days ago. OpenType/Improvement
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Maintainers usually reply within 1 day
Similar issues
-
☢️ Bug v3
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area/import-export area/projects concern/ux
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
go-vikunja/vikunja#4455 · 1 comment ·
Maintainers usually reply within 2 days
-
Dependabot PRs no longer merge automaticallyPossibly taken @dwisiswant0 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
projectdiscovery/urlfinder#160 ·
Maintainers usually reply within 1 day
-
database
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
chnm/legal-modernism#450 ·
Maintainers usually reply within 1 day
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day