Metadata Sharing Module
  1. Metadata Sharing Module
  2. META-273

MDS should stop you from exporting packages with invalid items

    Details

    • Type: Bug Bug
    • Status: Ready for Work
    • Priority: Should Should
    • Resolution: Unresolved
    • Affects Version/s: 1.0.9
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      Cosmin created a MDS package on our Haiti server (running 1.9), and when we tried to import it into a blank database in a unit test, it failed, because it can't save a concept that has duplicate names in the french locale.

      This should have been reported when he tried to export the package, and he should have been stopped from creating an invalid package, and distributing it.

      We should validate every item on export.

        Gliffy Diagrams

          Activity

          Hide
          Rafal Korytkowski added a comment -

          I think it's because we only validate items which are explicitly added to a package and not related items. The fix should go to org.openmrs.module.metadatasharing.task.impl.ExportPackageTask.exportSubpackage(List<Item>).

          Show
          Rafal Korytkowski added a comment - I think it's because we only validate items which are explicitly added to a package and not related items. The fix should go to org.openmrs.module.metadatasharing.task.impl.ExportPackageTask.exportSubpackage(List<Item>).
          Hide
          Rafal Korytkowski added a comment -

          Actually the code in exportSubpackage is correctly validating all items. I don't seem to reproduce it in a test either. Were you both running the latest versions of 1.9? There have been a few tickets closed around validators not working properly.

          Show
          Rafal Korytkowski added a comment - Actually the code in exportSubpackage is correctly validating all items. I don't seem to reproduce it in a test either. Were you both running the latest versions of 1.9? There have been a few tickets closed around validators not working properly.

            People

            • Assignee:
              Unassigned
              Reporter:
              Darius Jazayeri
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Development