Bug #1412: Fix problem converting to string clockStart and clockFinish
FEA: ItEr76S04BugFixing
This commit is contained in:
parent
5c608c9a4a
commit
691bd6634a
2 changed files with 12 additions and 13 deletions
|
|
@ -25,7 +25,6 @@ import java.util.Date;
|
|||
import java.util.Set;
|
||||
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.LocalTime;
|
||||
import org.libreplan.business.labels.entities.Label;
|
||||
import org.libreplan.business.resources.entities.Resource;
|
||||
import org.libreplan.business.workingday.EffortDuration;
|
||||
|
|
@ -38,9 +37,9 @@ public class HoursWorkedPerResourceDTO implements Comparable {
|
|||
|
||||
private Date date;
|
||||
|
||||
private LocalTime clockStart;
|
||||
private String clockStart;
|
||||
|
||||
private LocalTime clockFinish;
|
||||
private String clockFinish;
|
||||
|
||||
private EffortDuration effort;
|
||||
|
||||
|
|
@ -59,8 +58,8 @@ public class HoursWorkedPerResourceDTO implements Comparable {
|
|||
|
||||
this.workerName = resource.getName();
|
||||
this.date = workReportLine.getDate();
|
||||
this.clockStart = workReportLine.getClockStart();
|
||||
this.clockFinish = workReportLine.getClockFinish();
|
||||
this.clockStart = workReportLine.getClockStart().toString("HH:mm");
|
||||
this.clockFinish = workReportLine.getClockFinish().toString("HH:mm");
|
||||
this.effort = workReportLine.getEffort();
|
||||
this.orderElementCode = workReportLine.getOrderElement().getCode();
|
||||
this.orderElementName = workReportLine.getOrderElement().getName();
|
||||
|
|
@ -98,19 +97,19 @@ public class HoursWorkedPerResourceDTO implements Comparable {
|
|||
this.effort = effort;
|
||||
}
|
||||
|
||||
public LocalTime getClockStart() {
|
||||
public String getClockStart() {
|
||||
return clockStart;
|
||||
}
|
||||
|
||||
public void setClockStart(LocalTime clockStart) {
|
||||
public void setClockStart(String clockStart) {
|
||||
this.clockStart = clockStart;
|
||||
}
|
||||
|
||||
public LocalTime getClockFinish() {
|
||||
public String getClockFinish() {
|
||||
return clockFinish;
|
||||
}
|
||||
|
||||
public void setClockFinish(LocalTime clockFinish) {
|
||||
public void setClockFinish(String clockFinish) {
|
||||
this.clockFinish = clockFinish;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
<parameter name="labels" class="java.lang.String"/>
|
||||
<field name="workerName" class="java.lang.String"/>
|
||||
<field name="date" class="java.util.Date"/>
|
||||
<field name="clockStart" class="java.util.Date"/>
|
||||
<field name="clockFinish" class="java.util.Date"/>
|
||||
<field name="clockStart" class="java.lang.String"/>
|
||||
<field name="clockFinish" class="java.lang.String"/>
|
||||
<field name="self" class="org.libreplan.business.reports.dtos.HoursWorkedPerResourceDTO"/>
|
||||
<field name="effort" class="org.libreplan.business.workingday.EffortDuration"/>
|
||||
<field name="orderElementCode" class="java.lang.String"/>
|
||||
|
|
@ -343,7 +343,7 @@
|
|||
<rightPen lineWidth="1.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.util.Date"><![CDATA[$F{clockFinish}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{clockFinish}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="116" y="0" width="70" height="30"/>
|
||||
|
|
@ -355,7 +355,7 @@
|
|||
<rightPen lineWidth="1.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.util.Date"><![CDATA[$F{clockStart}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{clockStart}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="0" y="0" width="116" height="15"/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue