Include tag remote ids in filter content values for new tasks

pull/14/head
Sam Bosley 12 years ago
parent 28f6f40e24
commit 552c7b4460

@ -73,6 +73,7 @@ public class TagFilterExposer extends BroadcastReceiver implements AstridFilterE
ContentValues contentValues = new ContentValues(); ContentValues contentValues = new ContentValues();
contentValues.put(Metadata.KEY.name, TagMetadata.KEY); contentValues.put(Metadata.KEY.name, TagMetadata.KEY);
contentValues.put(TagMetadata.TAG_NAME.name, tag.tag); contentValues.put(TagMetadata.TAG_NAME.name, tag.tag);
contentValues.put(TagMetadata.TAG_UUID.name, tag.remoteId);
FilterWithUpdate filter = new FilterWithUpdate(tag.tag, FilterWithUpdate filter = new FilterWithUpdate(tag.tag,
title, tagTemplate, title, tagTemplate,

@ -48,6 +48,7 @@ public class FeaturedListFilterExposer extends TagFilterExposer {
ContentValues contentValues = new ContentValues(); ContentValues contentValues = new ContentValues();
contentValues.put(Metadata.KEY.name, TagMetadata.KEY); contentValues.put(Metadata.KEY.name, TagMetadata.KEY);
contentValues.put(TagMetadata.TAG_NAME.name, tag.tag); contentValues.put(TagMetadata.TAG_NAME.name, tag.tag);
contentValues.put(TagMetadata.TAG_UUID.name, tag.remoteId);
FilterWithUpdate filter = new FilterWithUpdate(tag.tag, FilterWithUpdate filter = new FilterWithUpdate(tag.tag,
title, tagTemplate, title, tagTemplate,

@ -536,6 +536,8 @@ public class TaskService {
Metadata metadata = new Metadata(); Metadata metadata = new Metadata();
metadata.setValue(Metadata.TASK, task.getId()); metadata.setValue(Metadata.TASK, task.getId());
metadata.mergeWith(forMetadata); metadata.mergeWith(forMetadata);
if (TagMetadata.KEY.equals(metadata.getValue(Metadata.KEY)))
metadata.setValue(TagMetadata.TASK_UUID, task.getValue(Task.REMOTE_ID));
PluginServices.getMetadataService().save(metadata); PluginServices.getMetadataService().save(metadata);
} }

Loading…
Cancel
Save