Skip to content

CTDL-ASN import succeeds but competencies don't link to framework (shows "0 competencies ready to edit") #1410

@nphoenix

Description

@nphoenix

Problem

CTDL-ASN files import without error but competencies are not linked to the framework. Import shows "Import success, 0 competencies ready to edit" regardless of how many competencies are in the file.

Prerequisites

Steps to Reproduce

  1. Import CTDL-ASN file (see attached test files)
  2. Detection works: "1 Framework and X Competencies Detected" ✅
  3. Click "Process Files" to import
  4. Import succeeds: "Import success, 0 competencies ready to edit" ⚠️
  5. Check framework in Frameworks list
  6. Framework shows "Items: 0" ❌

Expected Behavior

  • Framework should show correct competency count
  • Competencies should be linked and visible in framework
  • Opening framework should display all competencies

Actual Behavior

  • Import completes without error ✅
  • Framework is created ✅
  • But shows "Items: 0" ❌
  • Opening framework shows empty (no competencies) ❌
  • All competencies are missing despite successful import

Affected File Sizes

Tested with multiple file sizes - bug affects ALL imports:

  • ✅ 2 competencies: Imports, 0 shown
  • ✅ 20 competencies: Imports, 0 shown
  • ✅ 50 competencies: Imports, 0 shown

Root Cause (Suspected)

Import execution may be:

  1. Not creating competency records in database
  2. Not creating framework ↔ competency relationships
  3. Creating competencies but not linking them via isPartOf/hasTopChild
  4. Silently failing during competency processing

Test Cases

File 1: SAMPLE-IMPORT-BUG-DEMO.jsonld (2 competencies)

  • Minimal test case
  • All HTTP URLs, standard structure
  • Result: ✅ Imports, ❌ 0 competencies shown

File 2: SAMPLE-20-COMPETENCIES.jsonld (20 competencies)

  • Medium-sized framework
  • All HTTP URLs, standard structure
  • Result: ✅ Imports, ❌ 0 competencies shown

File 3: SAMPLE-50-COMPETENCIES.jsonld (50 competencies)

  • Larger framework
  • All HTTP URLs, standard structure
  • Result: ✅ Imports, ❌ 0 competencies shown

All files demonstrate the same issue: import succeeds but competencies are lost.

Impact

Suggested Investigation

  1. Find import execution function (likely importCtdlAsnJsonLd() or similar in backend)
  2. Add logging to see if competencies are being processed
  3. Check if competency records are created in database
  4. Verify framework-competency relationships are established
  5. Check for silent errors during competency import

Note: This is separate from #1408 (detection). Detection works, but import execution loses all competencies.

Additional Note: Files with 74+ competencies fail with a different error ("URL does not begin with http") - that will be reported separately.


[SAMPLE-IMPORT-BUG-DEMO.jsonld.txt](https://github.com/user-attachments/files/24340575/SAMPLE-IMPORT-BUG-DEMO.jsonld.txt)
[SAMPLE-50-COMPETENCIES.jsonld.txt](https://github.com/user-attachments/files/24340574/SAMPLE-50-COMPETENCIES.jsonld.txt)
[SAMPLE-20-COMPETENCIES.jsonld.txt](https://github.com/user-attachments/files/24340573/SAMPLE-20-COMPETENCIES.jsonld.txt)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions