| Summary: | drawEventsDownToTheHourAndMinute calculates wrong start and length of the events | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Jürgen Reichl <reichljuergen> | ||||
| Component: | Nebula | Assignee: | Emil Crumhorn <emil.crumhorn> | ||||
| Status: | CLOSED INVALID | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | michel.schaffers, nebula-inbox, tilman.reinhardt | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Jürgen Reichl
Created attachment 209918 [details]
quickfix
solution without minutes.
Made the same observation, draw to the minute feature does not calculate correct ends of an event.
fix the wrong beginning:
public int getStartingXFor(final Calendar date) {
...
final float widthonehour = getDayWidth()/24.0f;
final int hours = date.get(Calendar.HOUR_OF_DAY);
extra = (int) (widthonehour * hours);
...
fix the wrong length:
private int getXLengthForEvent(final GanttEvent event) {
...
if (_drawToMinute )
{
int minutesbetweenstartandend = DateHelper.minutesBetween(event.getActualStartDate().getTime(),
event.getActualEndDate().getTime(),
false, // assume same date
false); // assume same hour
return minutesbetweenstartandend * getDayWidth() / 24 / 60;
}
...
Actually i cannot reproduce the wrong behavior of drawEventsDownToTheHourAndMinute. But i made the same observation as Michel and opened a new bug 372970 for this! This bug does not have a target milestone assigned and is automatically closed as part of the 2.3.0 release cleanup. It could be that this bug is accidentally closed for which we apologize. If this bug is still relevant, please re-open and set a target milestone. |