Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-314

Update to PersonAddress does not update the address details

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2, 2.0
    • Labels:
    • Complexity:
      Low

      Description

      A JSON message with the address update values is created and is run using curl. No errors are thrown either in the client or in the server. But the details of the address is not updated to the database. I even checked the unit testcase "public void shouldEditIAnAddress() throws Exception" and there seems to be no problem with it and it runs correctly without errors.

      Not only this, I modified the "resource/impl/DelegatingSubResource.java" to print the value of the delegate object and it does print the output as if the address value has been updated, but when I check the database it is not. So the problem could be somewhere in openmrs core

      Address update message

      echo '
      {"cityVillage":"Bangalore","stateProvince":"Karnataka","address1":"new change in addr1","address2":"something","country":"India"}
      ' | curl -i -u admin:test -H "Content-type: application/json" -X POST -d @- https://localhost:8443/openmrs/ws/rest/v1/person/6a795282-3b8f-4c01-a188-15b9aea44d51/address/25059012-b487-4f0d-90e4-afce1588ef74 -b cookies.txt -k -3
      

      Output of the response message I printed by modifying the code:

      {display=new change in addr1, uuid=25059012-b487-4f0d-90e4-afce1588ef74, preferred=true, address1=new change in addr1, address2=something, cityVillage=Bangalore, stateProvince=Karnataka, country=India, postalCode=null, countyDistrict=null, address3=null, address4=null, address5=null, address6=null, startDate=null, endDate=null, latitude=null, longitude=null, voided=false, links=[org.openmrs.module.webservices.rest.web.Hyperlink@2ec82e19, org.openmrs.module.webservices.rest.web.Hyperlink@584a834d], resourceVersion=1.8}
      

        Attachments

          Activity

            People

            Assignee:
            dkayiwa Daniel Kayiwa
            Reporter:
            kavuri Sateesh Kavuri
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

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