Skip to content

Allow "create new version" (in builder) for bnf-dmd codelists - #3157

Open
Jongmassey wants to merge 1 commit into
mainfrom
Jongmassey/allow-create-new-version-bnfdmd-converted
Open

Allow "create new version" (in builder) for bnf-dmd codelists#3157
Jongmassey wants to merge 1 commit into
mainfrom
Jongmassey/allow-create-new-version-bnfdmd-converted

Conversation

@Jongmassey

@Jongmassey Jongmassey commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #3031

This adds the "Create New Version" button alongside the existing "Upload New Version" button for BNF to dmd converted codelists.

I chose to leave the Upload New Version button in place because users have previously uploaded new versions of converted codelists. We do not know if they do this only because they could not edit them in the builder. Nonetheless, because of the lack of support for additional columns (in this case the source BNF code), I believe we should retain this functionality in case of a user needing to update the codelist with this column intact. In time we may wish to review this decision.

image

Original converted version (old-style) with the BNF column
image

New draft new-style version in the builder, where the user is redirected to after clicking the "create new version" button
image

@Jongmassey
Jongmassey force-pushed the Jongmassey/allow-create-new-version-bnfdmd-converted branch from 68469d9 to e529365 Compare July 17, 2026 15:24
@Jongmassey Jongmassey changed the title Allow "create new version" for bnf-dmd codelists Spike: Allow "create new version" for bnf-dmd codelists Jul 17, 2026
@Jongmassey
Jongmassey force-pushed the Jongmassey/allow-create-new-version-bnfdmd-converted branch from 6165c72 to 93c0a86 Compare July 27, 2026 19:38
@Jongmassey Jongmassey changed the title Spike: Allow "create new version" for bnf-dmd codelists Allow "create new version" (in builder) for bnf-dmd codelists Jul 27, 2026
@Jongmassey
Jongmassey marked this pull request as ready for review July 27, 2026 19:38
else:
coding_system_release_outdated = False

is_converted_from_bnf = (

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This arguably could be implemented as a model property, but would only be used here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, "is this codelist a BNF to dm+d converted one?" is something I've had to derive multiple times when doing bits of analysis, it'd be nice if it were a property.

Nonetheless, this is still flaky (can be broken if a user updates the metadata to remove the elements we rely on),and we should consider adding an actual flag to the model so we're not reliant on this in future.

This commit allows a user to both upload a new version of a converted
codelist (as was previously available),
and to create a new version in the builder.

Currently, additional columns beyond "code" and "term" are permitted
only in uploaded codelists - i.e. they are not supported in the
builder.
The Psuedo-BNF to dm+d conversion process adds one such column,
the souce BNF code for the conversion.
Thus, preserving the ability to retain this column is important,
and is done so by continuing support for update by upload.

By adding the ability to edit in the builder, this allows users to
work around any deficiencies in the converted codelist
(e.g. the known lag in publishing the mapping data)
or to use a converted codelist as a starting point for future amendments.
@Jongmassey
Jongmassey force-pushed the Jongmassey/allow-create-new-version-bnfdmd-converted branch from 93c0a86 to d24bc6d Compare July 27, 2026 19:45
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.

Enhancement request: Enable editing of dm+d codelists in the builder after they've been converted from BNF

1 participant