Hi,
thank you, that was exactly I was looking for.
greetings,
Bartek
On 2012-02-14 15:56, Steffen Pingel wrote:
Hi,
you can dynamically provide a list of options by
implementing TaskAttributeMapper.getOptions(). The default
implementation falls back to the cached information in task data
but you can use a cached copy of the repository configuration
which may have more current information. Take a look at the
implementations for Trac or Bugzilla as an example.
HTH,
Steffen
On Tue, Feb 14, 2012 at 1:31 PM, Bartek <bimcio@xxxxxxxxx>
wrote:
Hi,
I'm writing connector for our in house ALM system and
got problems with offline tasks.
Some fields in our tasks are edited with drop-downs,
thus when initializing task in getTaskData(...) I add
information about available options to task's metadata,
basing on metadata retrieved from our system:
TaskAttribute attr = new TaskAttribute(task.getRoot(),
almFieldName);
....
attr.clearOptions();
...
for (ALMField field : almFields) {
attr.putOption(field.getId(), field.getName());
}
It works fine until metadata in our system is changed,
e.g. new possible options added to a dictionary. Then,
new tasks in mylyn are created fine (list of available
options contains latest changes). But when I edit tasks
created earlier (and saved to offline storage) then list
of available options in drop downs is not up to date.
I found that those options are saved to offline file,
e.g.:
<Attribute id="Status">
<values>
<value>2355</value>
</values>
<options>
<option>
<key>2355</key>
<value>New</value>
</option>
<option>
<key>2356</key>
<value>In Progress</value>
</option>
<option>
<key>2357</key>
<value>Solved</value>
</option>
</options>
<MetaData>...</MetaData>
<Attributes />
</Attribute>
Is there any method I can inject my code to be executed
when task is edited from offline file? I would add piece
of code to update available options in this loaded task.
greetings
Bartek
______________________________ _________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/
mailman/listinfo/mylyn- integrators
--
Steffen Pingel
Senior Software Developer, Eclipse Mylyn
Mylyn Tasks Lead
http://tasktop.com
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
|