MarvinAPI icon indicating copy to clipboard operation
MarvinAPI copied to clipboard

[REQUEST] Support completing tasks/projects through API

Open cbrxyz opened this issue 3 years ago • 5 comments

Statement of purpose I do solemnly swear (or affirm) that this is an API feature request and not a Marvin feature request. For a Marvin feature request I would use Product Board.

Is your feature request related to a problem? Please describe. There is currently no way to complete tasks or projects through either the API or database as far as I am aware of. Before Marvin kudos came along, setting the done key of tasks and projects to True would work, but now if you do that you will not be awarded Marvin kudos for completing tasks and projects.

Describe the solution you'd like An /api/complete endpoint that uses document ID's to find tasks/projects that should be completed. If possible, the number of Marvin kudos earned could be returned.

Describe alternatives you've considered As I said, setting done to True in task and project documents will complete them, but this will add Marvin kudos to the user's total.

Additional context Add any other context or screenshots about the feature request here.

cbrxyz avatar Jan 16 '21 22:01 cbrxyz

This would be hard to implement server-side since the number of kudos you get depends on the entire state of the app, like what tasks you've completed today and over the past days, whether it's the first task you completed today, info about all its parent projects/categories. I will think about this one. Probably the only doable solution is to award some number of kudos that depends just on the task itself. So you wouldn't get the same number of kudos (you'd be missing some of the bonuses and penalties), but it would at least be the correct order of magnitude :).

amazingmarvin avatar Jan 17 '21 13:01 amazingmarvin

Sounds good. I'm sure some task attributes like time estimate and priority may be able to provide a somewhat clear picture of around how many kudos should be awarded even if it isn't perfect.

cbrxyz avatar Jan 18 '21 10:01 cbrxyz

I'd like this not from a kudos perspective, but from a "not having to send out webhooks" perspective. :)

adamwolf avatar Jan 21 '21 04:01 adamwolf

Kudos aside, is there even a way to complete a task through the API, without downloading the whole task document including all attributes, id, and _rev, changing done to True, and then using couchdb database access to re-upload the entire task document in place?

It'd be nice to not have to know the entire state of a task, just to mark it completed. But it seems you cannot update a field in couchdb, only overwrite the whole document.

But I don't see a "complete task" entry on the Marvin API page.

Erudition avatar Dec 10 '21 06:12 Erudition

@Erudition Quite a late response, but it looks like they added a markDone API in Jan 2023 for this exact usecase!

RogueArt avatar Jan 22 '24 00:01 RogueArt