Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #1042 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Incorrect Link to Encounter Form When Searching for Observations

Reported by: sunbiz Assigned to: sunbiz
Priority: minor Milestone: (Completed) OpenMRS 1.4
Component: OpenMRS Code Base Keywords: SIMPLE-FIX
Cc: Introductory Ticket: 0
Code Review Status:

Description

Steps to reproduce: 1.) Admin -> Manage Observations 2.) Find Observation "by Encounter" and then Search 3.) In the Search Results, click on the Form will result in page not found.

Error 404 The page "/openmrs/admin/observations/encounter.form" cannot be found. Check the link and try again.

Attachments

#1042-fix-obsSearchResults.patch (1.4 kB) - added by sunbiz on 09/22/08 18:25:21.
The patch with the correct form link in Observation search and the corrected the spring code

Change History

09/18/08 20:56:46 changed by bwolfe

Where was Obs.patient referenced?

Instead of ../encounters, the better way to reference the url would be with "<openmrs:contextPath />/encounters/encounter.form" or "${pageContext.request.contextPath}/encounters/encounter.form". (Or you can even use the javascript global variable: openmrsContextPath :-)

09/18/08 21:24:27 changed by sunbiz

Obs.patient is at line 73: http://svn.openmrs.org/openmrs/trunk/web/WEB-INF/view/portlets/findObservation.jsp

Why would it be a better way to reference the url by adding extra processing, when we can be sure of the path of the url? Can the Observations and Encounters be in different context paths?? Some explanation on how those would be better will be useful.

09/19/08 19:56:27 changed by bwolfe

I think we can technically be sure of the url. I just feel that its a better habit to have the absolute url than a relative one.

That spring code should be Obs.person in the jsp page. The column was renamed from patient to person last year some time and apparently this page wasn't updated! :-)

09/22/08 18:25:21 changed by sunbiz

  • attachment #1042-fix-obsSearchResults.patch added.

The patch with the correct form link in Observation search and the corrected the spring code

09/22/08 18:35:56 changed by sunbiz

  • status changed from new to closed.
  • resolution set to fixed.

Added Changeset 5544 to fix the issue. To make Ben happy ;-) , changed the patch to use global js var - openmrsContextPath. Finds the form link correctly and also fixed the spring message for the person header

09/22/08 19:56:57 changed by bwolfe

FYI: Square braces around the revision number will link to the changeset in trac: [5544]

FYI #2: For future reference, one last round of patches/approval on trac will be needed. :-) Looks like this one worked out, but larger patches won't be this easy!

12/18/08 20:24:59 changed by bwolfe

  • review_status changed.

Backported to 1.3.x in [6084] by bmckown