dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04143
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1374: Minor fix
------------------------------------------------------------
revno: 1374
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-01-29 16:51:59 +0100
message:
Minor fix
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DeflatedDataValue.java
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.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-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java 2009-12-01 18:47:16 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java 2010-01-29 15:51:59 +0000
@@ -46,6 +46,7 @@
extends IdentifiableObject implements DimensionOptionElement
{
public static final String DEFAULT_NAME = "default";
+ public static final String DEFAULT_TOSTRING = "(default)";
/**
* The category combo.
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DeflatedDataValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DeflatedDataValue.java 2009-12-23 07:35:17 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DeflatedDataValue.java 2010-01-29 15:51:59 +0000
@@ -27,6 +27,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import static org.hisp.dhis.dataelement.DataElementCategoryOptionCombo.DEFAULT_TOSTRING;
+
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -43,7 +45,7 @@
public class DeflatedDataValue
{
private static final SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd" );
-
+
private int dataElementId;
private int periodId;
@@ -271,6 +273,11 @@
}
}
+ public String getCategoryOptionComboNameParsed()
+ {
+ return categoryOptionComboName != null && categoryOptionComboName.equals( DEFAULT_TOSTRING ) ? "" : categoryOptionComboName;
+ }
+
// -------------------------------------------------------------------------
// hashCode and equals
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm 2009-12-24 14:47:25 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm 2010-01-29 15:51:59 +0000
@@ -26,7 +26,7 @@
#set( $count = $count + 1 )
<tr #if( $mark == 0 ) style="background-color:#dddddd" #end>
- <td#alternate( $mark )><span id="value[$count].name">$value.dataElementName</span></td>
+ <td#alternate( $mark )><span id="value[$count].name">$value.dataElementName $value.categoryOptionComboNameParsed</span></td>
<td#alternate( $mark )>$value.sourceName</td>