LiquidPlanner Classic Forum
Can I update the track_time of person_id 0
*Posted on behalf of Graves, Mark. Original posting date 2015-01-22.*
Sometimes we have tasks that have yet to be assigned, but we'd like to be able to update those tasks to have correct remaining effort values (using track_time). In my testing, I believe I'm getting a "Bad Request 404" error when I try to update the remaining effort values for an unassigned task. Is this your intent?
Posted by LiquidPlanner Support over 4 years ago
Having problem retrieving low_effort_remaining
*Posted on behalf of a customer. Original posting date 2015-01-21.*
I’ve a problem with your API since the last update on the LP site (2015.01.10).
I can’t get all the estimate data. I use this url:
`https://app.liquidplanner.com/api/workspaces/XXXXX/packages/11111111/estimates`
The latest estimate was on 2015-01-09T16:58:39+00:00 the low was 750 hours.
But in this result `https://app.liquidplanner.com/api/workspaces/XXXXX/packages/11111111`
the low is: `"low_effort_remaining":1229.7732980226112`
I hope you can help us
Posted by LiquidPlanner Support over 4 years ago
Unable to remove Assignee via C# and the update_assignment API call
*Posted on behalf of Hasty. Original posting date 2015-01-20.*
Been having the same issue as a few others I've seen on here where newly created tasks using the API will tack on multiple assignees to a task. In our specific case we're importing TFS items from our SW database and creating tasks within LP to track these -- problem is that it creates multiple owners, both the person assigned in TFS and the person's account we use to do the importing.
Yes, I understand that we'll need to update our code to create a task using the "assignments" as an array of owners. However, I also need to ensure that our tasks can be updated appropriately by adding and removing owners/assignees. This is my problem -- I cannot remove an owner.
I've updated our API.cs file, taken from the old C# API example (BTW, can you update your example to include the new API calls?), with the new Assignment class and it works for the most part (had some issues with the "activity_id"). When I get tasks (Item) I can see the appropriate data in the array of assignments, so that appears to be working.
public class Assignment
```
{
public Int32 id { get; set; } // unique id for assignment
public Int32 person_id { get; set; } // who owns the assignment
public Int32 treeitem_id { get; set; } // identifies treeitem to which the assignment belongs
public Boolean is_done { get; set; } // true if assignment done, otherwise false
public float low_effort { get; set; } // low end of estimate in hours
public float high_effort { get; set; } // high end of estimate in hours
//public Int32 activity_id { get; set; } // activity to apply to the remaining work, some issues with this
}
```
Reading the documentation shows that to remove an owner from the list of assignments requires that you make a POST call and specify 1) the assignment_id and 2) the person_id as null. I do so with the following code:
```
post("/workspaces/" + this.WorkspaceId + "/tasks/" + data.id + "/update_assignment", new
```
```
{
assignment_id = assign.id,
person_id = "null", // this apparently doesn't work.
});
```
The response from LP never sees a change in the person_id. Trying person_id = (object)null throws a (500) internal server error. My limited success in trying to use the update_assignments has only gone so far as to update the low & high efforts for a particular owner.
In a nutshell, I cannot remove an owner from a task no matter the combination of command object. Even trying to set is_done = "true" does not seem to work.
What am I doing wrong?
Thanks,
Joe.
Posted by LiquidPlanner Support over 4 years ago
sum hours for a certain task, user, date range
*Posted on behalf of Jared Fedorchuk. Original posting date 2015-01-19.*
Through the API can I sum the hours a user spent on a specific task for a certain date range?
Something like this?
```
https://app.liquidplanner.com/api/workspaces/######/tasks/#########?member_id=######&start_date=2015-01-12&end_date=2015-01-19
```
Posted by LiquidPlanner Support over 4 years ago
JIRA use case
*Posted on behalf of a customer. Original posting date 2015-01-19.*
In speaking with a newer client, they are intending to have updates to estimates on many JIRA sub-tasks all feed into / roll up to a single LiquidPlanner task. They would anticipate having many groups of sub-tasks feeding to many tasks. I was having trouble conceptualizing how this might work via API - would it be possible for sub tasks to be updated with some kind of ID field that would allow them to all associate with one task?
Might this group be forced to consider an architecture where JIRA subtasks have a 1 to 1 relationship with a LiquidPlanner task?
Posted by LiquidPlanner Support over 4 years ago
how do I create a task without an assignee?
*Posted on behalf of a customer. Original posting date 2015-01-19.*
I want to create a task without any assignee, is it possible or not ? i have tested with the following script, i am passing assignments as null but its assigning to me as owner because i am administrator, in my opinion it does not make sense, see below at my script.
```
jQuery.ajax({
url :'https://app.liquidplanner.com/api/workspaces/######/tasks';,
type: 'POST',
beforeSend : function(xhr){
xhr.setRequestHeader("Authorization", "Basic " + 'YXXYXYXYXXYXYXYXYXYXYXYXXYXYXYXYXYXYXY}');
},
data: JSON.stringify({
"task": {
"name": "My task",
"parent_id": ########,
"assignments": null
}
}),
dataType: 'json',
contentType:'application/json; charset=utf8',
success: function(data){
console.log(data);
}
})
```
above script is creating the task for me but it is assigning to me as well, that does not make any sense to me. Why does it happening.
Posted by LiquidPlanner Support over 4 years ago
Unable to set estimates after multiple owners update of LP
*Posted on behalf of Wim Deblauwe. Original posting date 2015-01-19.*
Hi,
I am updating my Groovy script to work with the new LP update for multiple owners. I have added a person_id to my request JSON and I am using 'time_tracking' instead of 'estimates' as endpoint, but I still get a 400 error. This is what is going over the wire:
10:32:35.199 [main] DEBUG org.apache.http.wire - >> "POST /api/workspaces/XXXXX/tasks/XXXXXXXX/track_time HTTP/1.1[EOL]"
10:32:35.199 [main] DEBUG org.apache.http.wire - >> "Accept: application/json, application/javascript, text/javascript[EOL]"
10:32:35.199 [main] DEBUG org.apache.http.wire - >> "Content-Length: 63[EOL]"
10:32:35.199 [main] DEBUG org.apache.http.wire - >> "Content-Type: application/json[EOL]"
10:32:35.199 [main] DEBUG org.apache.http.wire - >> "Host: app.liquidplanner.com[EOL]"
10:32:35.199 [main] DEBUG org.apache.http.wire - >> "Connection: Keep-Alive[EOL]"
10:32:35.199 [main] DEBUG org.apache.http.wire - >> "Accept-Encoding: gzip,deflate[EOL]"
10:32:35.199 [main] DEBUG org.apache.http.wire - >> "Authorization: Basic MYSECRETAUTH[EOL]"
10:32:35.199 [main] DEBUG org.apache.http.wire - >> "[EOL]"
10:32:35.200 [main] DEBUG org.apache.http.wire - >> "{"estimate":{"person_id":XXXXX,"low":"40.0h","high":"44.0h"}}"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "HTTP/1.1 400 Bad Request[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Content-Encoding: gzip[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Cache-Control: no-cache[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Cache-Control: max-age=900[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Content-Type: application/json; charset=utf-8[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Date: Mon, 19 Jan 2015 09:32:34 GMT[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Expires: Mon, 19 Jan 2015 09:47:34 GMT[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Server: Apache[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Set-Cookie: _liquidplanner_session_id=##########################; path=/; secure; HttpOnly[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Status: 400 Bad Request[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Strict-Transport-Security: max-age=31536000[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "Vary: X-API-Version,Accept-Encoding[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "X-API-Version: 3.0.0[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "X-Frame-Options: SAMEORIGIN[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "X-LP-Action: track_time[EOL]"
10:32:35.500 [main] DEBUG org.apache.http.wire - << "X-LP-Controller: Api::Tasks[EOL]"
10:32:35.501 [main] DEBUG org.apache.http.wire - << "X-LP-Space: XXXXX[EOL]"
10:32:35.501 [main] DEBUG org.apache.http.wire - << "X-LP-User: XXXXXX[EOL]"
10:32:35.501 [main] DEBUG org.apache.http.wire - << "X-Rack-Cache: invalidate, pass[EOL]"
10:32:35.501 [main] DEBUG org.apache.http.wire - << "X-Request-Id: #################################[EOL]"
10:32:35.501 [main] DEBUG org.apache.http.wire - << "X-UA-Compatible: IE=Edge,chrome=1[EOL]"
10:32:35.501 [main] DEBUG org.apache.http.wire - << "Content-Length: 85[EOL]"
10:32:35.501 [main] DEBUG org.apache.http.wire - << "[EOL]"
What am I doing wrong?
regards,
Wim
Posted by LiquidPlanner Support over 4 years ago
Webhooks and estimates
*Posted on behalf of a customer. Original posting date 2015-01-15.*
We are looking at the web hook for estimates. When an estimate is created the web hook is fired, but in the post information there is no reference to the tree item the estimate is assigned to? That would be ok for an update but creating a new estimate renders it useless? There is no reference to the estimate in the task entry either?
Posted by LiquidPlanner Support over 4 years ago
Can't seem to assign multiple owners on an active task
*Posted on behalf a customer. Original posting date 2015-01-14.*
I have an active task but still i can't assign a task to multiple users, my code is following please let me know where i am wrong
```
jQuery.ajax({
url :'https://app.liquidplanner.com/api/workspaces/######/tasks/########;,
type: 'POST',
beforeSend : function(xhr){
xhr.setRequestHeader("Authorization", "Basic " + 'XXXXXXXXXXXXXXXXXXXXXX');
},
```
```
data: JSON.stringify({
"task": {
"name": "My task created in LP First",
"parent_id": ########,
"assignments": [{"person_id":111111},{"person_id":222222}]
}
}),
```
```
dataType: 'json',
contentType:'application/json; charset=utf8',
success: function(data){
console.log(data);
}
})
```
I am working to JIRA to LiquidPlanner integration, i am trying to assign multiple users to a task with the help of following script i am POSTing but i am getting the error 404 NotFound, and if i am using PUT then i am getting 400 BadRequest "You can only set assignments on newly-created items. Use update_assignment."
my script is following.
```
jQuery.ajax({
url :'https://app.liquidplanner.com/api/workspaces/######/tasks/##########';,
type: 'PUT',
beforeSend : function(xhr){
xhr.setRequestHeader("Authorization", "Basic " + 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
},
```
```
data: JSON.stringify({
"task": {
"name": "My task created in LP First",
"parent_id": ########,
"assignments": [{"person_id":111111},{"person_id":222222}]
}
```
```
}),
dataType: 'json',
contentType:'application/json; charset=utf8',
success: function(data){
console.log(data);
}
})
```
how to do update_assignment in existing task, i couldn't find anything about update_assignment in REST api docs.
Posted by LiquidPlanner Support over 4 years ago
How to set estimates on a task?
*Posted on behalf of Patrik Peltonen. Original posting date 2015-01-14.*
Hi!,
Im trying to set estimates on a task but i only get returned with: 500 Internal Server Error.
Is this the correct way to do it?
```
curl https://app.liquidplanner.com/api/workspaces/:workspace_id/treeitems/:treeitem_id/track_time
-d '{ low: "20h", high: "40h" }'
```
Posted by LiquidPlanner Support over 4 years ago