Repository navigation
[Arch] Determine Competency ID field strategy for taxonomy competency data #625
Description
Activity
- moved this to Todo in Competency Criteria and Student Progress
on Jul 1, 2026 - moved this from Todo to Needs additional details in Competency Criteria and Student Progress
on Jul 2, 2026 Posting the coordination notes that came out of drafting
docs/openedx_tagging/decisions/0010-tag-code-field.rstin #637 (the recommendation this issue asks for) — these don't belong in the ADR itself, but need to be tracked somewhere.Dependency direction with #613 (not #614). ADR 0010 adds a
tag_code_requiredproperty to the baseTaxonomyclass inopenedx_tagging, defaulting to false. TheCompetencyTaxonomymodel that #613 builds needs to override that property to returnTrue. That means ADR 0010's property should land before or alongside #613, not after it — #613 depends on this ADR, not the other way around. #614 (thetaxonomy_typeendpoint field) is a sibling to this ADR; neither blocks the other.Open risk: #634. "Taxonomy subclasses: embrace or deprecate?" is an unresolved architecture discussion that questions the proxy-subclass /
Taxonomy.cast()pattern this ADR'stag_code_requiredmechanism relies on (it's the same pattern already used for system-defined taxonomies). If that discussion concludes subclassing should be deprecated, this ADR's enforcement mechanism needs to be redesigned. Worth resolving #634 before or alongside this ADR.Pre-existing bug found, needs its own ticket. While designing the completeness rule, we found that
import_export/api.py's_import_validations()casts a taxonomy to its concrete subclass locally but discards the result, so the caller's original (possibly uncast) taxonomy instance keeps flowing through the rest of the import. No shipped taxonomy subclass has exercised this path before, so it's never surfaced — but this ADR's completeness check depends on reading the taxonomy's true type, so it needs a small fix (return and use the cast instance) before or alongside implementing this ADR. Filing as a separate bug ticket rather than folding into the ADR.Ticket sequence this ADR corresponds to. This issue (#625) is "Determine..."; ADR 0010's Decision section is the spec for the next ticket in the planned sequence (add
Tag.code+ the completeness rule to the data model). The remaining tickets (expose on GET endpoints, add to import, add to export, display in the Competency Management UI, docs/release notes) aren't filed yet.- moved this from Needs additional details to Ready for Community Review in Competency Criteria and Student Progress
on Jul 3, 2026 This has been addressed in this ADR PR: #637
The ADR can now be read on the main branch today from here: https://github.com/openedx/openedx-core/blob/main/docs/openedx_tagging/decisions/0010-mutable-tag-external-id.rst
- moved this from Ready for Community Review to Final Axim Review in Competency Criteria and Student Progress
on Jul 8, 2026 Looks great, thank you.
- moved this from Final Axim Review to Done in Competency Criteria and Student Progress
on Jul 10, 2026 - added a parent issue
on Aug 12, 2026
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Architecture Spike: Determine Competency ID field strategy for taxonomy competency data
Use Case
As a Platform Administrator, I want a stable, human-readable Competency ID visible for each competency in the Competency Management UI and on the assignment workflow, so that I can reference and communicate specific competencies using a meaningful identifier that my institution recognizes.
Description
Current behavior
The existing tag/taxonomy data model exposes several identifier fields per tag: an internal PK (
id, never user-visible), a stable external reference (uuid), and a client-meaningful key (_key/key). None of these is designed for use as a human-readable Competency ID in a management UI or assignment workflow. No such field currently exists.Requested change
Determine the ID field strategy for competency taxonomies: which field or fields represent the Competency ID, how the ID is assigned, and how it behaves across import, re-import, API retrieval, and UI display. This spike produces a documented recommendation for the data model implementation ticket — not code.
Key constraints the recommendation must respect:
Acceptance Criteria
This is an architecture spike. The deliverable is a documented technical recommendation, not working code. There is no Gherkin and no QA path.
Open Questions
ID assignment strategy (architect, blocking): Two options:
PK-1,PK-1.2,PK-1.2.3for root / second level / third level). User can override. The exact format of the suffix is part of what this spike defines.Option B is simpler to implement and avoids the edge case where a name change silently invalidates a previously meaningful auto-generated ID. Which fits the operator use case better?
Uniqueness scope (architect): Must the Competency ID be unique within a taxonomy, unique globally across all competency taxonomies, or is it advisory (displayed but not enforced)?
Re-import behavior (architect): On re-import, is the stored Competency ID preserved, overwritten if the import file includes an ID column, or always preserved (import file ID column ignored)? What import file column, if any, maps to this field?
Recommendation format (architect): ADR under
docs/decisions/, a GitHub discussion for community comment, or both? The community approval requirement suggests at minimum a public discussion before the ADR is finalized.Context for the Architect
Existing data model identifiers (see
src/openedx_tagging/core/tagging/models/):id— internal PK, never user-visibleuuid— stable external reference_key/key— client-meaningful, the DB field used in tagging operationsUX context: The existing UX designs for the Competency Management page and the assignment workflow show a visible Competency ID per competency. This ID appears on the control used to apply a competency to an assignment. The exact field this maps to is what this spike must determine.
Architect's current position (starting point, not a decision):
The Competency ID should be an internal identifier. CASE IDs and CTDL IDs, if added, are separate fields — conflating them (as has been suggested in the past) mixes internal and external identifier semantics and will cause problems when institutions want both.
The natural auto-generation scheme is: initials of each word in the competency name plus a hierarchical depth/position suffix. However, Option B (user-entered only) is likely simpler and avoids name-change invalidation. This is the core design question the spike should resolve with team and community input.