RESTWS-730 Help Needed

restws
Tags: #<Tag:0x00007f88c2a828f0>

(Andrei Stanila) #1

Hi . I’m was surfing the Jira and i found this issue. I’m writing this topic because i’m not sure if i know for sure what is the solution. So , i see that someone said that in OpenMRS core version 1.10.3 a property called birthtime was added to Person.class , but there is not resource for Person in 1.10.3 . And i checked and there is not PersonResource1_10.java or something like in 1.11 or higher . So i should create a new class PersonResource1_10.java in omod-1.10 just like the one in omod-1.11 . Am i right ? Can you explain what should be doing if not? Thanks and happy new year!!! :slight_smile:


(Juliet Wamalwa) #2

Congratulations for claiming a ticket to work on however, that ticket is in “need assessment” state claim one that is in "ready for work " state. https://wiki.openmrs.org/display/RES/Ticket+Curation


(Daniel Kayiwa) #3

@andu033 did you get a chance to look at this? https://wiki.openmrs.org/display/docs/Pull+Request+Tips


(Andrei Stanila) #4

I read now. Thanks . I will search for a ready for work ticket.


(Andrei Stanila) #5

RESTWS-730 was updated with ready to work. I already added PersonResource1_10.java and did the pull request . I’m waiting for review and if something else should be done for this issue :slight_smile:


(Andrei Stanila) #6

It doesnt pass the tests . Any ideea why?


(Dimitri R) #7

The actual error is a failing assert here:

asRepresentation_shouldReturnValidFullRepresentation(org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_10.PersonResource1_10Test)
org.openmrs.module.webservices.rest.web.response.ConversionException: deathdateEstimated on class org.openmrs.Patient
Caused by: java.lang.NoSuchMethodException: Unknown property 'deathdateEstimated'

The property deathdateEstimated was only added from Core 1.11.x. Dealing with PersonResource1_10 you are in a world where this property is not even supposed to exist on Person. I saw that you involve this property in your tentative representation for PersonResource1_10, that’s most likely where the problem lies. See my comments on your PR.


(Andrei Stanila) #8

Thanks for help. I did the requested changes and now all tests are working . Can you check if everything is ok? Thanks :slight_smile:


(Dimitri R) #9

Thanks @andu033, not sure how much I’ll be able to look into over the weekend, but in the meantime please claim the issue:


(Dimitri R) #10

A post was split to a new topic: RESTWS-708: OrderFrequency REST API