You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code does seem to run without error and the json returned by fetch_json function is a valid son with 'pos' changed. Tut no change on the interface. Is this a Trello API issue or py-trello library issue?
On the other hand, card.set_pos("bottom") does work.
But card.set_pos(2) does not work.
Any clues as to why this may be happening?
Thank you.
The text was updated successfully, but these errors were encountered:
Hopefully you found a way around this, but pos is NOT an index value, it's a positive float value that Trello uses when sorting the cards. So cards with a lower pos value go higher in the list, but when you tried to assign 2, it probably remained the lowest value in your list.
By default Trello seems to increment pos by 16384 and then if you insert a card between two cards Trello will assign a pos to the inserted card that is the average of the neighboring cards. One trouble is that if you assign a pos that collides with another card's pos, or if two pos values are too close together then Trello will recalculate the pos values. I've also found that if you assign very large (valid double) values Trello will adjust them to be much smaller. The best way I've found to do a sort is to sort your cards using py-trello and then set pos values in increments of 16384, like Trello does, and use an offset where necessary to make sure you aren't colliding with any existing pos values.
The code does seem to run without error and the json returned by fetch_json function is a valid son with 'pos' changed. Tut no change on the interface. Is this a Trello API issue or py-trello library issue?
On the other hand, card.set_pos("bottom") does work.
But card.set_pos(2) does not work.
Any clues as to why this may be happening?
Thank you.
The text was updated successfully, but these errors were encountered: