MauroDataMapper-NHSD / mdm-plugin-nhs-data-dictionary

Mauro Core Plugin for the NHS Data Dictionary
Apache License 2.0
0 stars 0 forks source link

Duplicate attributes appear in change paper (with data sets) for branch CR1903 #88

Closed pjmonks closed 2 months ago

pjmonks commented 3 months ago

Overview

When generating the DITA change paper for in-flight branch CR1903, to include data set definitions, the DITA output contains duplicate topics for Attributes which prevents the DITA from being transformed into a PDF.

Steps to replicate

  1. Make sure you have the CR1903 branch ingested.
  2. Sign in to the Orchestrator
  3. Select the CR1903 branch, click the "Publish" tab
  4. Click the generate button next to "Generate change paper (with Data Set definitions)"
  5. Open the DITA output in OxygenXML and view the changes.dita file

Expected behaviour

The DITA output should be valid and OxygenXML should be able to transform it into PDF.

Additional details

The topic elements for Attributes seem to have duplicate ids e.g. attribute_record_identifier appears multiple times. There should only be one copy.

Look at the code in ChangePaper.calculateChanges(), this should be where the "Changed data set" changes are added.