box-java-sdk icon indicating copy to clipboard operation
box-java-sdk copied to clipboard

Why can't general task created via Box Java SDK?

Open gurukashyap opened this issue 3 years ago • 1 comments

BoxTask only supports 'review' task , why can't we create general task. From Box UI it is supported.

https://github.com/box/box-java-sdk/blob/main/src/main/java/com/box/sdk/BoxTask.java

gurukashyap avatar Jun 14 '22 12:06 gurukashyap

Hi @gurukashyap ,

You can create general task using API: https://github.com/box/box-java-sdk/blob/main/doc/tasks.md#add-a-task-to-a-file I can see that current documentation is a bit outdated. So here is a snippet:

boxFile.addTask(BoxTask.Action.COMPLETE, "General Task created with API", null);

The BoxTask#getAction only returns Review action but as you can see it is deprecated and you should use BoxTask#getTaskType. I hope this answers your question.

antusus avatar Jun 14 '22 13:06 antusus

This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.

stale[bot] avatar Dec 19 '22 19:12 stale[bot]

This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box Java SDK and feel free to open another PR/issue at any time.

stale[bot] avatar Dec 26 '22 21:12 stale[bot]