dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20069
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9027: Fixed bug, completeness message not showing period name properly
------------------------------------------------------------
revno: 9027
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-11-14 15:21:10 +0100
message:
Fixed bug, completeness message not showing period name properly
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistration.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/completeness_message.vm
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java
--
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/dataset/CompleteDataSetRegistration.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistration.java 2012-03-12 14:27:51 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistration.java 2012-11-14 14:21:10 +0000
@@ -27,6 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@@ -63,6 +64,8 @@
private String storedBy;
+ private transient String periodName;
+
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
@@ -236,4 +239,15 @@
{
this.storedBy = storedBy;
}
+
+ @JsonIgnore
+ public String getPeriodName()
+ {
+ return periodName;
+ }
+
+ public void setPeriodName( String periodName )
+ {
+ this.periodName = periodName;
+ }
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/completeness_message.vm'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/completeness_message.vm 2012-04-25 20:33:53 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/completeness_message.vm 2012-11-14 14:21:10 +0000
@@ -1,2 +1,1 @@
-The form '$!{object.dataSet.name}' was registered as complete for period $!{object.period.name}
-and organisation unit '$!{object.source.name}'.
\ No newline at end of file
+The form '$!{object.dataSet.name}' was registered as complete for period $!{object.periodName} and organisation unit '$!{object.source.name}'.
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java 2012-09-24 21:54:54 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java 2012-11-14 14:21:10 +0000
@@ -158,7 +158,7 @@
registration.setDate( new Date() );
registration.setStoredBy( storedBy );
- registration.getPeriod().setName( format.formatPeriod( registration.getPeriod() ) );
+ registration.setPeriodName( format.formatPeriod( registration.getPeriod() ) );
boolean notify = dataSet != null && dataSet.getNotificationRecipients() != null;