Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » How to read the due date in newly created tasks?
How to read the due date in newly created tasks? [message #599454] Tue, 06 October 2009 15:33
maarten meijer is currently offline maarten meijerFriend
Messages: 146
Registered: July 2009
Senior Member
Hi,

I working on some issues raised by users beta version of Industrial SQL
Connector.
See bug 184532: [connector] Generic SQL connector
https://bugs.eclipse.org/bugs/show_bug.cgi?id=184532

On a newly created bug I have a field for the Due Date that I can set.
When I press submit, at some point I call myTaskDataHandler:

public RepositoryResponse postTaskData(TaskRepository repository,
TaskData taskData, Set<TaskAttribute> oldAttributes,
IProgressMonitor monitor) throws CoreException {

and determine whether it is a new task, I then try to get the value set
in TaskAttribute.DATE_DUE
....
taskDto.setDueDate(safeDate(taskData, TaskAttribute.DATE_DUE));
....

but the value of that attribute is not set at this stage, so how can I
retrieve it?

/**
* @param taskData
* @param key specifies {@link TaskAttribute}
* @return the Date if the attribute exists, or null if it does not exist
*/
private Date safeDate(TaskData taskData, String key) {
TaskAttribute attribute = taskData.getRoot().getMappedAttribute(key);
if (attribute != null) {
return taskData.getAttributeMapper().getDateValue(attribute);
}
return null;
}

Where can I find how to do this?



Maarten Meijer
Previous Topic:[Eclipse Bugzilla] mid-air collision
Next Topic:How to populate people content assist?
Goto Forum:
  


Current Time: Fri Apr 26 23:26:03 GMT 2024

Powered by FUDForum. Page generated in 0.03648 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top