reagan
(Reagan patrick Makoba)
January 29, 2020, 11:40am
1
While working on RefApp on this ticket https://issues.openmrs.org/browse/RA-950 , I came across an error when editing a Visit Date. https://pastebin.com/tFNNG8MP is thrown when you save…While the visit date change is well persisted;the response from the serve is not graceful. Can a ticket be created for it? @dkayiwa @mogoodrich @ruhanga @mozzy
1 Like
ruhanga
(Nathan Ruhanga)
January 29, 2020, 12:22pm
2
Thanks @reagan , did you manage to reproduce this on demo and qa-refapp ? If yes, you may please go ahead to create a ticket for this to unblock you if there’s not one already.
1 Like
reagan
(Reagan patrick Makoba)
January 29, 2020, 12:27pm
3
@ruhanga I tested it locally with sdk of latest snapshot and on qa-refapp as well, demo is currently unavailable…
ruhanga
(Nathan Ruhanga)
January 29, 2020, 12:39pm
4
I just reset the demo, you may as well go ahead to test on it. Feel free to create a ticket that’ll solve your blocker.
reagan
(Reagan patrick Makoba)
January 29, 2020, 1:02pm
5
On demo-server it redirects well…
reagan
(Reagan patrick Makoba)
January 30, 2020, 11:20am
6
@ruhanga It seems a recent PR merge edited the redirect URL…
ruhanga
(Nathan Ruhanga)
January 30, 2020, 8:16pm
7
Thanks @reagan . @mozzy could this be bootstrap related?
1 Like
reagan
(Reagan patrick Makoba)
January 30, 2020, 8:23pm
8
I think it’s an issue with the controller… The searchparams it gives on return find in this file…omod/src/main/java/org/openmrs/module/coreapps/fragment/controller/visit/VisitDatesFragmentController.java…
1 Like
ruhanga
(Nathan Ruhanga)
January 30, 2020, 8:52pm
9
Okay @reagan , looks like there is a jQuery conflict before/after a successful post is made though. Here is a caught error in the Chrome Dev tool,
TypeError: $.getJSON(...).success is not a function
ruhanga
(Nathan Ruhanga)
January 30, 2020, 9:18pm
10
@reagan you could go ahead to create a ticket that resolves this. The success()
method was deprecated in preference of done()
in jQuery 3.4.1 . This means correcting the occurrences of this method such as the one below in that js file.
/**
* Functions used to edit visit dates (uses VisitDatesFragmentController)
*/
visit.showEditVisitDateDialog = function(visitId) {
if (!editVisitDialogs[visitId]) {
editVisitDialogs[visitId] = emr.setupConfirmationDialog({
selector: '#edit-visit-dates-dialog-' + visitId,
actions: {
confirm: function() {
var url = emr.fragmentActionLink("coreapps", "visit/visitDates", "setDuration");
$.getJSON(url, $('#edit-visit-dates-dialog-form-' + visitId).serialize()).success(function(data) {
if (data.success) {
jq('#edit-visit-dates-dialog-form-' + visitId + ' .icon-spin').css('display', 'inline-block').parent().addClass('disabled');
// TODO Do we need to update this to specify return url, or is this link only going to ever be used from the old visits view?
window.location.search = data.search;
}
}
);
return false;
}
}
reagan
(Reagan patrick Makoba)
February 2, 2020, 1:00pm
12
@ruhanga Kindly review the issue here and advice on how to make it more clear. https://issues.openmrs.org/browse/RA-1696 . Kind regards…
1 Like
reagan
(Reagan patrick Makoba)
February 2, 2020, 6:36pm
13
The fix works fine…Will send the PR when its made ready for work.
ruhanga
(Nathan Ruhanga)
February 3, 2020, 6:55am
14
Thanks @reagan . @mozzy could you transition RA-1696 to ready for work? Thanks.
1 Like
dkayiwa
(Daniel Kayiwa)
February 3, 2020, 7:56am
15
@ruhanga i have just given you admin permissions to that JIRA project. So you should also be in position to do the needful.
2 Likes
ruhanga
(Nathan Ruhanga)
February 3, 2020, 8:11am
16
Thanks @dkayiwa . @reagan I hope you can now get the pull request through.
ruhanga
(Nathan Ruhanga)
February 28, 2020, 12:07pm
17
Thanks @reagan , I just merged the PR on RA-1696
1 Like
mozzy
(Moses Mutesasira)
February 28, 2020, 2:32pm
19
@reagan deserves a dev2 badge for the geat work he as done in RA
2 Likes
dkayiwa
(Daniel Kayiwa)
February 29, 2020, 7:16pm
20
Can you initiate a talk post?
2 Likes