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

Provide configuration setting that can allow turning off validation in Save Handlers



    • Complexity:


      The introduction of much more extensive validation rules in OpenMRS 1.9 has led to a lot of issues with implementations that upgraded from previous versions.

      For the most part, these validation rules are good additions. However, there are certain administrative functions that either require, or would greatly benefit from, the ability to turn off automatic validation in save handlers. Some examples:

      • It is impossible to clean up some invalid patient states in the existing UI currently, due to the nature of how the objects are being saved, and what their dependencies are.
      • When importing a metadata package, particularly a large one from a known source, it is often preferable to first just get the package imported cleanly, and then second to run the validation module and clean up any issues that come up. Currently, what happens is that you hit a validation error during the save process which results in a stack trace to the end user, which needs lots of digging and tweaking of packages to fix. Often a consumer of a metadata import package doesn't have access to the original source, and just wants to get that data across - warts and all - and then wants to clean it after the fact.
      • When cleaning up metadata (particularly in a sync environment) it is often better or easier to clean up particular issues atomically. For example, go through every concept and fix duplicate names. Then go fix duplicate mappings. Then go fix missing descriptions. etc. However, the nature of validation in the save handler means that every issue for a particular concept needs to be fixed at the same time, before saving or else the save will fail. It would be far easier to be able to turn off validation on save, run through an update script, and then turn validation back on at the end.

      A global property would be the most straight-forward way to implement this, but other suggestions are welcome.

      Ideally we would like this feature back-ported into the 1.9.x release line.

        Gliffy Diagrams




              Unassigned Unassigned
              mseaton Mike Seaton
              3 Vote for this issue
              8 Start watching this issue



                  Time Tracking

                  Original Estimate - 1 day
                  Remaining Estimate - 1 day
                  Time Spent - Not Specified
                  Not Specified