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

Daemon user has no associated person

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      While testing out the reporting module against 1.9.x, I found that I was getting an NPE when running a particular bit of code through a scheduled process. The code looks like this:

      Context.getUserContext().getAuthenticatedUser().getPersonName().toString()
      

      Upon investigating, it appears that the newly introduced Daemon user has no associated person, and therefore calls to "getPersonName()" return null. This is likely a backwards compatibility issue that needs to be addressed. Also, it would seem to be inconsistent with our validation on Users, which currently requires a person association (eg. UserValidator.validate(daemon) would fail).

        Attachments

          Activity

            People

            Assignee:
            dkayiwa Daniel Kayiwa
            Reporter:
            mseaton Mike Seaton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: