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

Validators should be called when unretiring/unvoiding an object

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.2.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      When an object is being saved to the database through the API it first gets validated, apparently when unvoiding/unretiring objects the validation logic is skipped due to the fact that the responsible AOP is only wrapped around save methods, it's very likely that we're saving back invalid items to the database. Validator(s) should be called before saving an object that's getting unvoided/unretired.

      TODO

      • Go through all services and update all unretireXXX() and unvoidXXX() methods to call the appropriate save methods on the services instead of those on the DAO objects, you will need to call Context.getXXXService() and call save on the returned instance which should be a spring proxy object so that the AOP around save methods is applied.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jtatia Jai Tatia
                Reporter:
                wyclif Wyclif Luyima
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: