Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3025

Modules should optionally be uninstalled entirely

    XMLWordPrintable

    Details

    • Complexity:
      Medium

      Description

      In order to keep clean and manageable data for the system
      as a System Admin
      (sometimes) I want to remove all of the irrelevant files/data when a module is uninstalled.

      Acceptance criteria:

      1. When a module is being uninstalled you should be able to choose if you want to keep or remove its data.
        • Provide a dialog: "Do you want to remove all data created by the module? Yes/No".
        • If user chooses 'Yes', remove the following data: module classes and files contained in an omod (already implemented), tables, global properties and custom files created by the module.
        • If user chooses 'No', only module classes and files contained in an omod should be removed (already implemented).
      2. When a module is being upgraded none of data mentioned above should be removed.
      3. When a module is being downgraded you should be able to choose if you want to keep or remove its data.
        • Provide a dialog: "Do you want to remove all data created by the module? Yes/No (the operation may fail)".
        • If user chooses 'Yes', remove all the data mentioned above.
        • If user chooses 'No', only module classes and files contained in an omod will be removed but the operation may fail. So provide a warning such as - "All data created by the module will be kept, but the operation may fail."

      Chosen solution:

      1. Notify a module that it is being uninstalled. The module should be able to list tables, global properties and files to delete. The actual deletion should be done by the core.
        • If this is a module downgrade, the method should be given the version being uninstalled and the lower version being installed.

      See these files: moduleList.jsp, ModuleListController, ModuleFactory

      I suggest this be a class that has methods to get the table names to remove, files to delete, GPs to delete, etc.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              raff Rafal Korytkowski
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 6 hours
                  6h
                  Remaining:
                  Remaining Estimate - 6 hours
                  6h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified