Setting Effort using effortAllocation
Hey folks!
I'm having some issues setting Effort using the API. Per the "tasks" page in the API Documentation, I'm trying to set a task's Effort using effortAllocation in a POST request, but the tasks will not upload if I include it. My JSON for effortAllocation is as follows:
effortAllocation: {
"mode": "Basic",
"allocatedEffort": 90,
"totalEffort": 90
}
I append that to my URI in JavaScript as follows:
encodeURI(`/api/v4/folders/${folder}/tasks?...&effortAllocation=${JSON.stringify(job.effortAllocation)}`)
Also of note:
- When I don't include effortAllocation, the tasks push into the desired folder just fine
- I have tried building my JSON object with just "mode" and "allocatedEffort", "mode" and "totalEffort" and, even just with "mode", but none of them have properly loaded
- Other JSON objects stringify without breaking the request
- I'm using a Wrike Enterprise Basic account, if that were to effect anything
Any help with this would be immensely appreciated!
Hello Jacob Joslyn, welcome to the Community 👋🏻
Our Support team is in touch with you about your question here via email. Please let me know if I can help with anything else 🙋🏻♀️
I have the same issue almost 4 years later. effortAllocation as a parameter doesn't work at all. I get Exception: Failed to create task: 400, {"errorDescription":"Parameter 'effortAllocation' value is invalid","error":"invalid_parameter"} every time whether I have it as an empty object or filled with parameters.
When using the dates object, I can't set 'start'. My parameters look like: parameters={'title': "a. Design", 'description': "Design the chute system.", 'dates': {'duration': 480*10, 'start': f'{pd.Timestamp.now().strftime('%yyyy-%MM-%dd')}'}}
and if I take the start away, it creates the task with no issues.
Welcome to the Community Forums, Ethan Helder! I can see that you have already reached out to our Support Team regarding this issue. I hope they were able to assist you. Do let me know if you require further help. Thanks!
Rohan V Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover
Rohan V Wrike Team member Become a Wrike expert with Wrike Discover