Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mylyn-integrators] Refresh available options for offline task

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



Back to the top