bugwarrior icon indicating copy to clipboard operation
bugwarrior copied to clipboard

Feature Request: create ability to load tasks from HTTP service

Open StephanMeijer opened this issue 4 years ago • 11 comments

This'd be useful for me, because this'll enable me to grab tasks from my own HTTP services.

StephanMeijer avatar Nov 09 '20 12:11 StephanMeijer

I don't know what this means. Is it about using unencrypted services or a new service api?

ryneeverett avatar Nov 09 '20 14:11 ryneeverett

What I am imagining is a service, to use simple HTTP requests in order to obtain new tasks.

For example my own HTTP endpoint:

GET /washingmachine

[
{
"description": "Washingmachine is now done. Clear out washingmachine",
"entry":"20201103T201940Z",
"modified":"20201103T202001Z",
"priority":"L",
"project":"Home",
"tags":["home","organize"]
}
]

So that automatically a task to clear out the washingmachine will be created if my washingmachine is done and not running.

StephanMeijer avatar Nov 09 '20 20:11 StephanMeijer

Great idea integrating taskwarrior with IOT. However I'm not sure how much value bugwarrior has when you're fetching data that's already in taskwarrior's expected format. Bugwarrior's main value is in translating from a variety of different data formats into taskwarrior's format. For your use case it seems like you'd be just as well off with (pseudo-code) curl /washingmachine | task import.

ryneeverett avatar Nov 09 '20 21:11 ryneeverett

Good point, although I suspect it'd require me on my point to manage the completion of this task on my own. So i'd need to write a framework around it. And it would be a framework like Bugwarrior. So then we go full cycle.

StephanMeijer avatar Nov 10 '20 01:11 StephanMeijer

I'm not sure what aspects you're referring to as "framework". I wouldn't be opposed to this as long as bugwarrior is providing notable value beyond only-having-to-run-one-command-to-update-tasks.

Also, more generally, it might make sense to implement a plugin api so that people can use custom services without them having to be community maintained. On the other hand I'm not sure our current api is all that great and it might be inconvenient to have to consider backwards compatibility when refactoring.

ryneeverett avatar Nov 10 '20 01:11 ryneeverett

@ryneeverett I thought of exactly that this month, but indeed: would be somewhat difficult but not impossible.

StephanMeijer avatar Nov 13 '20 19:11 StephanMeijer

I'm not sure what aspects you're referring to as "framework". I wouldn't be opposed to this as long as bugwarrior is providing notable value beyond only-having-to-run-one-command-to-update-tasks.

Any thoughts on this?

ryneeverett avatar Nov 15 '20 07:11 ryneeverett

@ryneeverett Yep: a normal import does not keep track of the tasks already imported. Also Bugwarrior gives the ability to easily configure things

StephanMeijer avatar Nov 15 '20 14:11 StephanMeijer

a normal import does not keep track of the tasks already imported

If the uuid is the same, the existing task will be edited. What's the difference?

ryneeverett avatar Nov 15 '20 18:11 ryneeverett

What if the remote returns an empty list? Then there won't be any task to import, so the task already imported won't be set to completed, right?

StephanMeijer avatar Nov 16 '20 01:11 StephanMeijer

What if the remote returns an empty list? Then there won't be any task to import, so the task already imported won't be set to completed, right?

True

ryneeverett avatar Nov 16 '20 21:11 ryneeverett