Fernando Posted August 9, 2022 Report Share Posted August 9, 2022 Hello, Using the following way to write the bid day number to a task does not seem to work, the bid days always remain 0.00 in the web UI: task['bid'] = 5 Other attributes - such as the status - do update correctly, so I am sure that I am addressing the correct task. I don't receive any error, so I'm confused why this does not work. Any idea why this is not working? If I need to provide any additional information, I'll be more than happy to provide it Cheers, Fernando Link to comment Share on other sites More sharing options...
Yas Opisso Posted August 9, 2022 Report Share Posted August 9, 2022 I think that bids are stored in seconds. You will need to convert the 5 bid days to seconds (assuming an 8 hour / day or whatever you have setup as default). Best, - Yas Link to comment Share on other sites More sharing options...
Fernando Posted August 12, 2022 Author Report Share Posted August 12, 2022 Hi Yas, Thanks for answering. I don't really see how I'm supposed to convert the 5 value to sec? Like I understand I can just do: 5*8*60*60=144000 sec, but that's still an integer. I've tried converting it to a float, but to no avail. In the ftrack documentation they are just using an int as well: https://ftrack-python-api.rtd.ftrack.com/en/2.3.0/working_with_entities.html?highlight=bid#updating-entities Maybe I'm misunderstanding and the task['bid'] does not correspond to the "Bid days" in the web UI? Cheers, Fernando Link to comment Share on other sites More sharing options...
Patrick Boucher ftrack Posted August 17, 2022 Report Share Posted August 17, 2022 Hi Fernando, I've not been able to reproduce your issue. Things are working as expected with the process outlined below. Here is the state of my task before: Then I edited it with the following code (taken from an interactive Python session): In [40]: task = session.get("Task", "f6d48138-1e81-11ed-abfe-c2a412b9415f") In [41]: task["bid"] = 5 * 8 * 60 * 60 In [42]: session.commit() In [43]: And the result was as follows: You'll notice that the number input in the bid field is an integer representing the number of seconds. This is computed using 8 hours per day because that's what my "Workday length" is set to in my Scheduling settings. If this is not the behaviour you're seeing, could you provide us with a full set of steps so that maybe we have better luck at reproducing the issue? Cheers, Patrick Andrew Lawrence 1 Link to comment Share on other sites More sharing options...
Fernando Posted August 22, 2022 Author Report Share Posted August 22, 2022 I got it to work how you suggested: It wasn't clear that I really needed to change the value to seconds to have a high enough number that gets reinterpreted to 5.00 days. The documentation made it seem that I just had to write the number of days to that value. Thank you for your answer! Cheers, Fernando Link to comment Share on other sites More sharing options...
Patrick Boucher ftrack Posted August 22, 2022 Report Share Posted August 22, 2022 Fernando, Do you have a link to the particular piece of documentation? I'd like to review it with the team and adjust the wording to make things clearer if necessary. Thanks! Link to comment Share on other sites More sharing options...
Fernando Posted August 23, 2022 Author Report Share Posted August 23, 2022 Hi Patrick, Yes this is the documentation I was reading:https://ftrack-python-api.rtd.ftrack.com/en/2.3.0/working_with_entities.html?highlight=bid#updating-entities Cheers, Fernando Link to comment Share on other sites More sharing options...
Patrick Boucher ftrack Posted August 25, 2022 Report Share Posted August 25, 2022 I've updated this in our docs and they should be deployed when the API is next tagged and released. Fernando 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now