Skip to main content

API: Big bug with updating parent of an item.


kubens_dev123
Forum|alt.badge.img+1

Hello,

I’ve found out that updating parent of an item (via PATCH boardID.type.itemID endpoint) does not work properly in a specific scenario:

You want to move an item to a frame that was created after the item was. Such operation results in adding the item to frame’s children list, but the item is hidden and invisible under or below the frame. While moving the frame, the item moves along. It is also very inconvenient to bring this item back to the foreground.

Updating parent works correctly only when trying to move an item to pre-existing frame.

 

Was it helpful?

3 replies

William Bishop
Mironeer
Forum|alt.badge.img+4

Hi ​@kubens_dev123,

Thanks for raising this and for sharing the different behaviors you experience when adding a child item to a frame, depending on whether the frame was created before or after the children items.

This is currently a known behavior for our Web SDK and REST API when adding children items, and I can appreciate it’s a bit of a departure from the UI, where items are always added at the top layer of a frame and never behind it.

We’ve raised this behavior with our team for further consideration and I can definitely appreciate why it could make sense to always have children item get added at the top layer of a parent frame when added via API.

While the team takes this under consideration, there is one workaround that you can leverage for the case where items are sent behind frames that were created after the items themselves. This would be to leverage the layers methods in our Web SDK—for example, you can call the `bringToFront()` method:
https://developers.miro.com/docs/websdk-reference-sticky-note#bringtofront

Thanks again for raising this, and we’ll be happy to keep you updated if there are any changes to this in the future.


kubens_dev123
Forum|alt.badge.img+1

Thanks for working on fixing this! So there is no workaround whilst using REST API? I know i could let’s say duplicate an existing item and delete the old one, but there is no destined endpoint for bringing to front?

 


kubens_dev123
Forum|alt.badge.img+1

Hello ​@William Bishop,

are any steps taken in order to fix this buggy updating parent behaviour?