Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openmrs/openmrs-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a0f3c860fc5a
Choose a base ref
...
head repository: openmrs/openmrs-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 16862a7f32ae
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Dec 13, 2012

  1. When you open the edit page for a scheduled task, if you leave the page

    without saving, the repeat interval unit gets changed to seconds no
    matter what it was previously - TRUNK-3759
    wluyima committed Dec 13, 2012
    Copy the full SHA
    ac9bb64 View commit details

Commits on Mar 1, 2013

  1. Merge pull request #144 from wluyima/TRUNK-3759

    When you open the edit page for a scheduled task, if you leave the page without saving, the repeat interval unit gets changed to seconds no matter what it was previously - TRUNK-3759
    dkayiwa committed Mar 1, 2013
    Copy the full SHA
    16862a7 View commit details
Original file line number Diff line number Diff line change
@@ -184,20 +184,22 @@ protected Map<String, String> referenceData(HttpServletRequest request, Object c
TaskDefinition task = (TaskDefinition) command;

Long interval = task.getRepeatInterval();

if (interval == null || interval < 60)
Long repeatInterval;
if (interval == null || interval < 60) {
map.put("units", "seconds");
else if (interval < 3600) {
repeatInterval = interval;
} else if (interval < 3600) {
map.put("units", "minutes");
task.setRepeatInterval(interval / 60);
repeatInterval = interval / 60;
} else if (interval < 86400) {
map.put("units", "hours");
task.setRepeatInterval(interval / 3600);
repeatInterval = interval / 3600;
} else {
map.put("units", "days");
task.setRepeatInterval(interval / 86400);
repeatInterval = interval / 86400;
}

map.put("repeatInterval", repeatInterval.toString());
return map;
}

Original file line number Diff line number Diff line change
@@ -276,7 +276,7 @@ window.onload = init;
<td valign="top"><openmrs:message code="Scheduler.scheduleForm.repeatInterval"/>:</td>
<td>
<spring:bind path="task.repeatInterval">
<input type="text" id="repeatInterval" name="repeatInterval" size="10" value="${status.value}" />
<input type="text" id="repeatInterval" name="repeatInterval" size="10" value="${repeatInterval}" />
<select name="repeatIntervalUnits">
<option value="seconds" <c:if test="${units=='seconds'}">selected</c:if>><openmrs:message code="Scheduler.scheduleForm.repeatInterval.units.seconds" /></option>
<option value="minutes" <c:if test="${units=='minutes'}">selected</c:if>><openmrs:message code="Scheduler.scheduleForm.repeatInterval.units.minutes" /></option>