| Summary: | Worklog: validate fields (Estimate, TimeSpent) | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Thomas Ehrnhoefer <thomas.ehrnhoefer> |
| Component: | Mylyn | Assignee: | Steffen Pingel <steffen.pingel> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 274914 *** |
Some validation would be great. Right now, the connector tries to parse (using the #m #h #d #w format), and if it fails will set it to 0. Validation results could be displayed with control contributions, like <code> if (amountTextControlDecoration == null) { amountTextControlDecoration = new ControlDecoration(timeSpentText, SWT.TOP | SWT.LEFT); amountTextControlDecoration.setShowOnlyOnFocus(false); FieldDecoration errorImage = FieldDecorationRegistry.getDefault().getFieldDecoration( FieldDecorationRegistry.DEC_ERROR); amountTextControlDecoration.setImage(errorImage.getImage()); amountTextControlDecoration.setDescriptionText(Messages.WorkLogPart_Time_Spent_Error_Decorator_Hover); } if (invalid) { amountTextControlDecoration.show(); } else { amountTextControlDecoration.hide(); } </code>