06:04:10
|
*** robbyoconnor has quit IRC
|
06:05:33
|
*** robbyoconnor has joined #openmrs-sprint
|
06:06:24
|
*** bwolfe has joined #openmrs-sprint
|
06:06:24
|
*** ChanServ sets mode: +o bwolfe
|
06:07:50
|
*** bwolfe has quit IRC
|
06:08:07
|
*** bwolfe has joined #openmrs-sprint
|
06:08:07
|
*** ChanServ sets mode: +o bwolfe
|
07:01:11
|
*** dkayiwa has joined #openmrs-sprint
|
07:27:08
|
*** bwolfe has quit IRC
|
07:44:16
|
<dkayiwa> after doing an update, trying to run any unit test gives me this:
|
07:44:20
|
<dkayiwa> Caused by: java.lang.ArrayIndexOutOfBoundsException
|
07:44:21
|
<dkayiwa> ERROR - TestContextManager.prepareTestInstance(336) |2011-05-20 11:23:39,539| Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@239a0feb] to prepare test instance [org.openmrs.module.webservices.rest.web.controller.PatientIdentifierControllerTest@2d1b99c4]
|
07:44:29
|
<dkayiwa> is there anything i need to do?
|
07:50:54
|
<dkayiwa> sorry i had some conflicts. resolving them fixed the problem
|
08:05:17
|
*** bwolfe has joined #openmrs-sprint
|
08:05:17
|
*** ChanServ sets mode: +o bwolfe
|
08:14:51
|
<dkayiwa> hi bwolfe
|
08:15:59
|
<dkayiwa> bwolfe: is there any reason why PersonNameResource is not extending DelegatingSubResource just like PatientIdentifierResource does?
|
08:16:42
|
<bwolfe> I don't know of a specific reason, no
|
08:20:15
|
<dkayiwa> because of its current base class DataDelegatingCrudResource, am going to create a new class which subclasses this one, such that i am able to add some subresource specific things like CRUD methods which take a parentUniqueId paremeter
|
08:20:23
|
<dkayiwa> do you approve of that?
|
08:21:01
|
<dkayiwa> or should i just commit and you review?
|
08:21:48
|
<dkayiwa> bwolfe: am happy with either option
|
08:23:05
|
<bwolfe> I can't think of why personanmeresource would not be a subresource, so I think you should just change it. I would guess that it is like that because it was a temp fix by sunny
|
08:23:07
|
<bwolfe> but I don't know
|
08:23:17
|
<bwolfe> check the person tickets to see
|
08:23:28
|
<bwolfe> I think it was a quick fix to get user resources working
|
09:06:59
|
*** dkayiwa has quit IRC
|
09:07:22
|
*** dkayiwa has joined #openmrs-sprint
|
09:49:54
|
<dkayiwa> hi bwolfe
|
09:50:08
|
<dkayiwa> bwolfe: which ticket would you recommend i do next?
|
09:50:41
|
<dkayiwa> bwolfe: most of the existing ones are sub tasks of tickets others are working on
|
09:56:27
|
* bwolfe looks
|
09:57:20
|
<bwolfe> dkayiwa: how are your maven archetype creating skills? https://tickets.openmrs.org/browse/RESTWS-3
|
09:57:37
|
<bwolfe> or this one is quicker: https://tickets.openmrs.org/browse/RESTWS-13
|
10:06:28
|
<dkayiwa> bwolfe: am very poor at maven stuff :)
|
10:06:51
|
<bwolfe> heh, ok
|
10:07:01
|
<bwolfe> tacle the #13 one then, its a settings page
|
10:07:13
|
<bwolfe> dkayiwa: /don't/ use a the gp portlet though (as the ticket says)
|
10:07:30
|
<bwolfe> make a proper settings page so you can put full examples, validation, etc
|
10:07:47
|
<dkayiwa> ok
|
10:09:29
|
<dkayiwa> bwolfe: all these are non essential tickets, is that still fine as of now?
|
10:09:49
|
<dkayiwa> in terms or prioritization: bwolfe
|
10:14:00
|
<bwolfe> thats all thats left unassigned dkayiwa
|
10:14:20
|
<dkayiwa> ok :D
|
10:23:39
|
<dkayiwa> bwolfe: let me do the maven arhetype one. will help me learn more of maven
|
10:25:20
|
<bwolfe> ok, that one potentially could have subtasks of: 1) create and deploy the archetype to mavenrepository.openmrs.org 2) determine the documentation pattern and where to put it 3) the java code that scans over the objects and pulls out the representations
|
10:25:39
|
<dkayiwa> ok
|
11:11:12
|
<OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Modules: Reporting Compatibility 1.5.4 uploaded to OpenMRS Module Repository <https://dev.openmrs.org/modules/view.jsp?module=reportingcompatibility-parent&version=&1.5.4>
|
12:16:24
|
<OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Modules: Reporting Compatibility 1.5.4.1 uploaded to OpenMRS Module Repository <https://dev.openmrs.org/modules/view.jsp?module=reportingcompatibility&version=&1.5.4.1>
|
12:38:59
|
*** wyclif has quit IRC
|
12:57:49
|
<dkayiwa> hi bwolfe
|
13:01:02
|
*** wyclif has joined #openmrs-sprint
|
13:04:08
|
*** wyclif has quit IRC
|
13:04:59
|
*** wyclif has joined #openmrs-sprint
|
13:05:11
|
*** dkayiwa has quit IRC
|
13:05:27
|
*** dkayiwa has joined #openmrs-sprint
|
13:10:09
|
<wyclif> bwolfe, in this webservice module, how comes everything is in the webModuleApplicationContext.xml file
|
13:10:29
|
<wyclif> it has no moduleApplicationContext.xml file
|
13:10:52
|
<wyclif> i thought it is web layer stuff that should go in the webXXX one
|
13:33:42
|
<wyclif> i think i have answered myself, looking at the beans defined in it, they all seem to be in the web layer
|
13:33:56
|
<wyclif> and besides it is a web service
|
13:50:34
|
*** dkayiwa has quit IRC
|
13:57:44
|
*** dkayiwa has joined #openmrs-sprint
|
14:08:21
|
<bwolfe> wyclif: yeah, 90% of this module is in the web layer because its a webservices module
|
14:20:33
|
<wyclif> thanks
|
14:32:17
|
*** dkayiwa has quit IRC
|
14:41:08
|
*** cta has joined #openmrs-sprint
|
14:41:33
|
<cta> Hello, sprinters! How are you?
|
14:45:08
|
*** dkayiwa has joined #openmrs-sprint
|
14:45:42
|
*** cta_ has joined #openmrs-sprint
|
14:46:33
|
*** cta_ has quit IRC
|
14:47:03
|
*** cta_ has joined #openmrs-sprint
|
14:48:55
|
*** cta has quit IRC
|
14:55:51
|
<wyclif> hey cta_
|
15:03:30
|
*** cta_ has quit IRC
|
15:03:45
|
*** cta has joined #openmrs-sprint
|
15:28:51
|
*** dkayiwa has quit IRC
|
15:45:42
|
<wyclif> bwolfe, djazayeri, looks like the module engine can't pick up a listener that i have defined in the webModuleApplicationContext.xml file
|
15:45:54
|
<wyclif> has anyone done this before?
|
15:46:28
|
<wyclif> am trying to add a globalPropertyListener
|
16:01:41
|
<djazayeri> wyclif: I haven't ever done it from a module
|
16:01:53
|
<djazayeri> what does the code you tried look like?
|
16:03:02
|
<wyclif> djazayeri, Below is what am adding to webApplicationContext.xml
|
16:03:07
|
<wyclif> <bean id="restWebServiceWebEventListeners" parent="openmrsEventListeners">
|
16:03:07
|
<wyclif> <property name="globalPropertyListeners">
|
16:03:07
|
<wyclif> <list value-type="org.openmrs.api.GlobalPropertyListener" merge="true">
|
16:03:07
|
<wyclif> <bean class="org.openmrs.module.webservices.rest.web.RestUtil" />
|
16:03:07
|
<wyclif> </list>
|
16:03:08
|
<wyclif> </property>
|
16:03:09
|
<wyclif> </bean>
|
16:03:59
|
<wyclif> and i make RestUtil implement GlobalPropertyListener
|
16:04:39
|
<wyclif> but when i log the list of loaded global property listeners, it is not even among them
|
16:07:04
|
<djazayeri> looking at the underlying code in org.openmrs.api.EventListeners, it looks like we aren't supporting this in core.
|
16:07:53
|
<djazayeri> i.e. if you look at EventListeners.setGlobalPropertyListeners, it does not _add_ to the list, but rather it replaces it.
|
16:13:29
|
<wyclif> djazayeri, then that would mean that the list would get replaces by the single listener am defining and not leaving it out
|
16:13:47
|
<djazayeri> unless some other module is also defining listeners
|
16:13:49
|
<wyclif> sorry! replaced
|
16:14:07
|
<wyclif> i only have one module in my installation
|
16:14:18
|
<wyclif> oh! may be logic
|
16:14:21
|
<djazayeri> wyclif: you could try using the debugger and putting a breakpoint on the setGlobalPropertyListeners method
|
16:14:44
|
<djazayeri> but we will definitely have to fix this in core
|
16:17:10
|
<wyclif> i think the module engine should be the one to be figure out that module listeners need to be added and not replace pass in a list that
|
16:17:28
|
<wyclif> i think the module engine should be the one to be figure out that module listeners need to be added and not replace with the passed in list
|
16:18:13
|
*** cta has quit IRC
|
16:20:48
|
*** wyclif has quit IRC
|
16:21:01
|
*** wyclif_ has joined #openmrs-sprint
|
16:21:34
|
*** wyclif has joined #openmrs-sprint
|
16:27:13
|
<bwolfe> wyclif: there is a specific call that you have to use to put in listeners
|
16:27:21
|
<bwolfe> look in the openmrs-servlet.xml to see exactly what it is
|
16:31:11
|
<wyclif> bwolfe, this is all am seeing in openmrs-servlet.xml
|
16:31:13
|
<wyclif> <bean id="webEventListeners" parent="openmrsEventListeners">
|
16:31:13
|
<wyclif> <property name="globalPropertyListeners">
|
16:31:13
|
<wyclif> <list value-type="org.openmrs.api.GlobalPropertyListener" merge="true">
|
16:31:13
|
<wyclif> <bean class="org.openmrs.web.controller.PseudoStaticContentController" />
|
16:31:13
|
<wyclif> <bean class="org.openmrs.web.dwr.DWRPatientService" />
|
16:31:14
|
<djazayeri> wyclif: we use this same (ugly) pattern all over the place: core defines a service with a list property
|
16:31:14
|
<wyclif> </list>
|
16:31:16
|
<wyclif> </property>
|
16:31:18
|
<wyclif> </bean>
|
16:31:26
|
<djazayeri> and its setter actually just adds to the list
|
16:31:39
|
<djazayeri> so that modules can add to the list in applicationContext.xml
|
16:33:22
|
<djazayeri> but in this case we've done the pattern incorrectly, so the way it will work is that only the last module to call this wins
|
16:36:45
|
<djazayeri> see SerializationServiceImpl.setSerializers for an example of it done right.
|
16:37:01
|
<djazayeri> and compare to EventListeners.setGlobalPropertyListeners
|
16:38:00
|
<wyclif> can't the module engine cache the list of already registered listeners, then add the module listeners to it and set the new updated list when calling setGlobalPropertyListeners
|
16:39:16
|
<wyclif> i think that works too
|
16:47:21
|
<bwolfe> the merge=true is the key
|
16:47:35
|
<bwolfe> spring is actually constructing one big list and should only call the setter once
|
16:47:42
|
<bwolfe> wyclif and djazayeri ^^
|
16:48:02
|
<djazayeri> bwolfe: that is not how merge works
|
16:48:24
|
<bwolfe> hmm, you sure?
|
16:48:31
|
<djazayeri> it appears to work that way if you only add to the list once
|
16:48:39
|
<bwolfe> the merge combined with the parent should do that ...
|
16:48:51
|
<djazayeri> no
|
16:49:14
|
<djazayeri> merge means "merge what I define here into the parent bean's definition, before constructing a new bean from this xml"
|
16:49:50
|
<djazayeri> it doesn't merge the list, it merges the bean definitions
|
16:49:56
|
<djazayeri> (which is basically useless)
|
16:51:07
|
<wyclif> darius may be right
|
16:51:19
|
<djazayeri> I remember investigating this at lenth before
|
16:52:17
|
<djazayeri> and discovering that merge does _not_ do what we want
|
16:52:48
|
<bwolfe> well, it works between api and web
|
16:52:59
|
<bwolfe> because api adds some and the web adds those
|
16:53:08
|
<bwolfe> so you just need to copy the web pattern to the module and it will work
|
16:53:20
|
<djazayeri> that isn't right
|
16:53:27
|
<djazayeri> the merge pattern works one time
|
16:53:30
|
<bwolfe> renaming ids of course, otherwise things are overridden
|
16:53:41
|
<djazayeri> i.e. you can have the core place, and one more thing that overrides it with a merge
|
16:53:51
|
<djazayeri> but if you add a second thing with a merge, it will remove the first one
|
16:54:10
|
<bwolfe> hmm, I'm 90% sure I had a module that did this too...
|
16:54:23
|
<bwolfe> unfortunately, I have no idea what that module was :-/
|
16:54:30
|
<bwolfe> (or might have been)
|
16:54:53
|
<djazayeri> really we're going to need to make the core fix so that "set" actually does an "add"
|
16:57:15
|
<wyclif> darius is right, we need to fix this in core so that setGlobalPropertListeners actually adds to the list and always repalce it
|
16:57:22
|
<wyclif> i have tested it and it works
|
16:57:41
|
<wyclif> so the last module that gets loaded and is registering listeners wins
|
16:57:54
|
<wyclif> otherwise they are never merged
|
16:59:22
|
<wyclif> so for now i will commit my code for https://tickets.openmrs.org/browse/RESTWS-4
|
16:59:45
|
<wyclif> and create a ticket to fix setGlobalProperties method
|
17:05:30
|
<wyclif> djazayeri, bwolfe, if the admin hasn't set this global property for the server url prefix, should we just throw an exception?
|
17:05:41
|
<djazayeri> wyclif: fine for now
|
17:05:48
|
<djazayeri> eventually we might want to guess
|
17:06:04
|
<wyclif> ok, sounds good to me
|
17:34:17
|
*** cta has joined #openmrs-sprint
|
17:40:22
|
<cta> wyclif, bwolfe, djazayeri: I have a problem with retrieving patient as cohort's member. Seems that retrieved Patient's uuid is null
|
17:53:16
|
<djazayeri> cta: where is this happening?
|
17:53:21
|
<djazayeri> are you doing the cohort member subresoruce?
|
17:53:44
|
<cta> yep
|
17:55:51
|
<djazayeri> how are you doing it?
|
17:55:58
|
<djazayeri> can you attach a patch to the ticket?
|
17:56:27
|
<djazayeri> cta: you'll have to do something out of the ordinary with that ticket
|
17:56:35
|
<djazayeri> (which I think you discussed with others on irc)
|
17:57:22
|
<cta> yes, I diid something out of ordinary, I'm attaching the patch now
|
18:03:09
|
<cta> djazayeri: Daruis, I've just adedd a patch for a ticket, as you asked. Can you make a review?
|
18:05:45
|
<djazayeri> I'll take a look
|
18:08:58
|
<wyclif> djazayeri, bwolfe, if i throw an exception if the server url global property is not set, it means am going to add a tet superclass for all webservice controller tests to extend that inserts this global property before the class is executed
|
18:09:18
|
<wyclif> otherwise the tests would always fail
|
18:09:27
|
<djazayeri> wyclif: is there an easy way to set it automatically?
|
18:09:50
|
<djazayeri> or maybe instead of throwing an exception, set it to "NEED-TO-CONFIGURE-GP"?
|
18:10:23
|
<wyclif> it would be very manual for the developer to set it everytime that they add a test class
|
18:11:47
|
<wyclif> do we want to have that in production?
|
18:12:17
|
<cta> wyclif: Wyclif, can you approve my last request in skype?
|
18:15:07
|
*** cta has quit IRC
|
18:19:31
|
<djazayeri> wyclif: I mean, I don't care if the unit tests say "NEED-TO-CONFIGURE/ws/rest/..."
|
18:19:37
|
<djazayeri> and I think that's fine in production too, actually.
|
18:22:50
|
<wyclif> so that means it is the default value
|
19:16:12
|
<wyclif> djazayeri, for getRepresentationDescription(Representation rep)
|
19:17:06
|
<wyclif> in ConceptClass, i can't get rid of it, unless you are saying that we implement it in the superclass i.e MetadataDelegatingCrudeResource
|
19:17:29
|
<djazayeri> are you required to implement it? (i.e. is it abstract in the superclass?)
|
19:17:39
|
<wyclif> correct
|
19:17:54
|
<djazayeri> If you implement it and have it return null, then the superclass should automatically handle things.
|
19:18:04
|
<djazayeri> (because the framework will look for a @RepHandler instead)
|
19:19:04
|
<wyclif> djazayeri, but still the audit info won't be returned by the superclass otherwise we have to add it
|
19:19:25
|
<wyclif> the superclass doesn't have a full representation
|
19:20:23
|
<djazayeri> add one
|
19:20:30
|
<djazayeri> wyclif: ^^
|
19:21:04
|
<wyclif> ok
|
19:21:26
|
<djazayeri> should be the same as the default rep + auditInfo
|
20:30:15
|
*** bwolfe has quit IRC
|
21:16:19
|
*** wyclif has quit IRC
|
22:49:31
|
<OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (obs-codes-expanded): Creating obs-codes-expanded for surangak to provide a mechanism for supporting coded observations that point to domain o... <http://feedproxy.google.com/~r/OMRStrunk/~3/lV2n_W1Z-R0/OpenMRS>
|