LiquidPlanner Classic Forum
How to update ownership and estimates correctly ?
Posted on behalf of Thibaud. Original posting date 2014-10-27.
Hi,
We use LiquidPlanner (LP) to manage projects (mostly for planning) but JIRA for the time tracking. We developped an application that synchronises JIRA to LP (one-way). So we can create new tasks, update info (owner/assignee, low/high estimate, description, etc.). We don't mind much about work log (who does what) we just want to make sure the time left, assignee and done status of tasks in JIRA are properly updated in LP.
With the new changes, the part that I don't quite get is the multiple assignments. As there is no way to test it before it's too late, this scares me a bit because having the synchronization work became critical in our organization.
When all I want is to make sure the owner of the task reflects the assignee in JIRA and that the remaining estimates (low and high) are up to date (we use the track_time service to update the difference between JIRA and LP), what are the precautions I have to take ? Because I read that assigning the same person to a task will throw an error. Do I use the track_time service the same way I used it in the past (but adding the person_id) for time tracking ? Do I have to delete extra assignments ? If we want to have only one assignee, do we simply update an assignment based on its ID ?
My plan is to do this:
1- update all task info except estimates and ownership
2- update the owner:
2.a. if the task.assignments[0].person_id == => do nothing (is there a risk of having multiple assignements?)
2.b. otherwise, send a request to /update_assignment with {"assignment_id": task.assignments[0].id, "person_id": }
3- update the estimates (I use the same request to /time_tracking with the difference in estimates in JIRA and LP and the person_id being the )
Is that OK ? I have a feeling that there's a risk of having assignments with person_id: 0 (Unassigned user) or worse, if people for a reason or another change ownership (and log work??) in LP, there will be multiple assignments.
Sorry if my questions aren't clear enough, if you need any clarification, don't hesitate to ask. Thanks for the help.
- Thibaud -
You should be able to see the assignments field in the API today. While the owner limit is still 1 on tasks currently, the API has been updated to include assignments field as it will appear.
track_time service works the same, takes 'member_id' as a parameter and will create a new assignment if the member is not already assigned. So, you don't need to update_assignment before tracking time.
Does that help?
Posted on behalf of Thibaud.
Thanks for the answer.
I modified my application to use the new assignments and to stop using owner_id. As of today, evertyhing seems to be working (in a subset of data). Because of the 1 owner limit in today's API, I cannot fully test the application before it goes live. What I want to make sure is that after each sync, there is only one owner per task in LP. If I get it right, if a person logs work, then another logs work, there will be 2 assignments, each with a different person_id. Those two persons will be considered owners, thus their schedule in LP and all the planning related to them will be impacted. In order to avoid this, as the reality is that there is always only one owner per task (because we use JIRA), I want to make sure to remove any ownership of previous owners when assigning a new one. But I also don't want to lose their logged time.
Let's say there are 2 owners on a task, how can I keep only one (either 1 of the 2 or a 3rd one)?
Thanks,
Thibaud--
It's true that if a person logs time, they will be assigned to the task, but it will not affect their schedule. Each assigned person has their own estimate and a user who only logs time will not inherit the estimate you are setting via API. Here's a screenshot of what it will look like:
In this example, "josh" is the person for whom you are estimating the task via API. As you can see, they have an estimate and their assignment row is not marked done.
"Dev TBD" is a different person who has logged time to the task. They get an assignment row, but they have no estimate and the row is marked done. Therefore, their schedule is unaffected.
Any further estimates you make via track_time will go directly onto the assignment matching the person_id you specify (in this case josh).
Please let me know if you have further questions.
Posted on behalf of Thibaud.
Ok, thank you, I think I have all the answers I need. Would love to fully test the multiple assignments before it's too late though (as I won't be there in december and the sync is critical to our organization).
Regards,
Hi Thibaud,
We understand your need to test more fully and are looking into the possibility of enabling access to the feature prior to release. I will update you when I have more information.
Thanks,
Liz
Posted on behalf of Thibaud.
Hi,
Since the last changes to the API (multiple owners), I cannot update the time tracking correctly.
Here's the info I send:
POST to : https://app.liquidplanner.com/api/workspaces/<project>/tasks/<task>/track_time
{
"activity_id": , (e.g: 111000)
"low": "10",
"high": "16",
"person_id": , (e.g: 123456)
"work": 1
}
I'm hoping to log 1h for the user (123) and update the low and high estimates.
As discussed in this thread: https://liquidplanner.zendesk.com/entries/57821054-How-to-update-ownership-and-estimates-correctly-
I use the person_id which should match one of the assignments OR create a new one.
Here's what I get instead:
{
"type": "Error",
"error": "BadArgument",
"message": "Invalid person_id or member_id."
}
How am I supposed to log work with the new API, I thought the only change regarding time tracking is the person_id parameter becoming required.
Regards,
Thibaud
Hi,
Is the person_id being used a normal user or a virtual user?
Posted on behalf of Thibaud.
Hi,
Good guess, this is a virtual user. Using 0 doesn't work either, but using a normal user ID does work.
How can we assign work for virtual users then ?
Thanks,
Hi,
The API does not support logging time for virtual users
You should be able to update the estimate by:
POST to https://app.liquidplanner.com/api/workspaces/<project>/tasks/<task>/update_assignment
Take a look at https://liquidplanner.zendesk.com/entries/55487574-READ-ME-important-info-about-upcoming-code-changes-on-January-10th
Posted on behalf of Thibaud.
In the past (before the update) this worked. By using the owner_id I could update time tracking on virtual users, this is a serious drawback if it's not supported anymore.
Updating the estimate will not update the work log. I'll check if that's enough in our case, but this is still a drawback compared to what we had.
Posted on behalf of Thibaud.
Hi,
After further investigation, it looks like in the past, the time was indeed logged to the user used for the synchronization. It didn't show because of the limit of one owner. The only difference now is the process has to be done in 2 steps:
1- Log time on sync user
2- Update estimate for current assignee
So this should not impact the way we use the synchronization (once the change is done to follow the 2 steps to log time and update estimates).
Thank you and sorry for my reaction, this synchronization is critical to our organization and I thought things had changed in a very significant way.
Regards,
Posted on behalf of Thibaud.
Hello,
I had issues updating the remaining estimates because based on the following documentation, the attributes for low and high are: low_effort and high_effort (before it was simply low and high). But it didn't work until I used the full attribute: low_effort_remaining, also, instead of using hours (as before and as documented), we have to use days (so simply dividing by 8) or the string representation (e.g: "4h"):
https://liquidplanner.zendesk.com/entries/55487574-READ-ME-important-info-about-upcoming-code-changes-on-January-10th
Am I completely missing something or is the documentation outdated ?
Thanks,
Posted on behalf of Thibaud.
I realized that using track_time allows to update both work log and remaining estimates for real member, while using update_assignment will allow to update estimate for virtual members but not work log.
When using track_time, low and high remaining efforts are defined with low and high and the unit for numbers is hours.
When using update_assignment, low and high remaining efforts are defined with low_effort_remaining and high_effort_remaining and the unit for numbers is days.
Hi,
You've found a bug that we'll address shortly. The intent of the API is to always use hours, but it currently defaults bare numbers to your space default.
You should be able to work around this issue ( and not have it break when we fix the bug ) by supplying your days as a string with "d" at the end. So "0.5d" or hours with "4h".
Posted on behalf of Thibaud.
Hi,
Thank you, I'll make sure to use the string version.
Regards,
Posted on behalf of Ando Gala.
Hi,
I'm receiving a 400 Bad Request error when I try to POST an update_assignment. I'm following the explanation that is on this link:
https://liquidplanner.zendesk.com/entries/55487574-READ-ME-important-info-about-upcoming-code-changes-on-January-10-2015-re-Multiple-Owners-on-Tasks-
To update an existing assignment, you will first need the assignment_id (from a GET request on the Treeitem). Then, send a POST with the assignment_id and whichever attributes you want to change.
Could you share a working curl POST example? I'd really appreciate it.
Thanks,
PS: Is there any difference updating the remaining estimate for a real member or for a virtual one?
Here is an example of how to update an existing assignment's estimate:
curl -X POST -g
"https:// app.liquidplanner.com/api/workspaces/[workspace_id]/treeitems/[task_id]/update_assignment"
-d '{ "assignment_id": ###, "low_effort_remaining": ###, "high_effort_remaining": ### }'
If you use this method to update estimates, it does not matter if the user is real or virtual. Virtual users cannot track_time.
Posted on behalf of Maxavier Jeanphilippe.
My internship project was to create a script that integrates JIRA's API and LiquidPlanner's API in realtime. With only 3 weeks time I was able to create one sided integration from JIRA to LiquidPlanner :
https://github.com/Maxthecoder1/Jira-to-LiquidPlanner-Realtime-API-Integrator
Maxavier Jeanphilippe
Software Engineer
https://www.linkedin.com/in/maxthecoder
ο»Ώ