dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31921
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16308: Fixed bug - Exception thrown when to sort options in option-set.
------------------------------------------------------------
revno: 16308
committer: Tran Chau<tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-08-04 22:15:52 +0700
message:
Fixed bug - Exception thrown when to sort options in option-set.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/option/hibernate/HibernateOptionStore.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sortOptionsForm.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/option/hibernate/HibernateOptionStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/option/hibernate/HibernateOptionStore.java 2014-08-04 14:27:32 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/option/hibernate/HibernateOptionStore.java 2014-08-04 15:15:52 +0000
@@ -99,7 +99,7 @@
hql += "and lower(option.name) like ('%" + option + "%') ";
}
- hql += "order by index(option)";
+ hql += " order by index(option)";
Query query = getQuery( hql );
query.setEntity( "optionSet", optionSet );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2014-08-03 07:05:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2014-08-04 15:15:52 +0000
@@ -664,7 +664,7 @@
<action name="addOption"
class="org.hisp.dhis.dataadmin.action.option.AddOptionAction">
- <result name="success" type="redirect">option.action?id=${optionSetId}</result>
+ <result name="success" type="redirect">option.action?optionSetId=${optionSetId}</result>
<param name="anyAuthorities">F_OPTIONSET_PUBLIC_ADD, F_OPTIONSET_PRIVATE_ADD</param>
</action>
@@ -678,7 +678,7 @@
<action name="updateOption"
class="org.hisp.dhis.dataadmin.action.option.UpdateOptionAction">
- <result name="success" type="redirect">option.action?id=${optionSetId}</result>
+ <result name="success" type="redirect">option.action?optionSetId=${optionSetId}</result>
<param name="anyAuthorities">F_OPTIONSET_PUBLIC_ADD, F_OPTIONSET_PRIVATE_ADD</param>
</action>
@@ -705,6 +705,11 @@
<param name="page">/dhis-web-maintenance-dataadmin/sortOptionsForm.vm</param>
<param name="anyAuthorities">F_OPTIONSET_PUBLIC_ADD, F_OPTIONSET_PRIVATE_ADD</param>
</action>
+
+ <action name="sortOptions" class="org.hisp.dhis.dataadmin.action.option.SortOptionsAction">
+ <result name="success" type="redirect">option.action?optionSetId=${optionSetId}</result>
+ <param name="anyAuthorities">F_OPTIONSET_PUBLIC_ADD, F_OPTIONSET_PRIVATE_ADD</param>
+ </action>
<action name="getOptionList"
class="org.hisp.dhis.dataadmin.action.option.GetOptionListAction">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sortOptionsForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sortOptionsForm.vm 2014-07-29 07:52:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sortOptionsForm.vm 2014-08-04 15:15:52 +0000
@@ -30,7 +30,7 @@
<tr>
<td colspan='2'>
<input type="submit" value="$i18n.getString( 'save' )" style="width:10em" />
- <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='option.action?id=$optionSet.id'" style="width:10em" />
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='option.action?optionSetId=$optionSet.id'" style="width:10em" />
</td>
</tr>
</table>