Clone or Move subitem to another parent and update created update by id

Hi, Could you please help us to find a correct way how to implement the following functionalities via Monday API?

  • We need to change parent item of sub-item in same board. Sub-items API doesn’t contain update API method, what is the correct way to do that?
  • Change body of “updates” entity by update id. Updates API doesn’t contain update API method as well

I am from Playtika and we buy monday subscription. Can you help or if I can’t do this, you can extend your API to full clone or move subitem to another parent with all setted columns and updates, because you have this ability on you UI.

Hi @taruuuch,

To change the parent item of a subitem, you can take the parent item ID and use a mutation to update it’s values. You’ll want to keep in mind that subitems and items technically live on different boards, so the board ID for the parent item will be different from the board ID of the subitem, given that subitems are made on a separate board.

Our API does not support changes to the body of updates – but I’m happy to pass this along to our team as a feature request.

I hope this helps! Please let me know if you have any more questions.

Hi, @alessandra I tried to mutate parent_item_id and it didn’t work, maybe you can show an example of a request how to do it correctly for an existing subitem?

1 Like

Hello there @taruuuch,

Are you trying to change the ID of a parent item?

If so, it can not be done. IDs can not be changed.

If that is not the case, can you please share the mutation you are using and the exact response you are getting from our server?

Cheers,
Matias

@Matias.Monday Hello, we can’t do this and say to @alessandra for example of this mutation for change ID of a parent item

Hello again @taruuuch,

I am not sure I understood your reply.

Item IDs can not be changed if that is what you are trying to achieve.

If you send me the mutation you are using and the response you are getting, I can take a look into it.

Cheers,
Matias

@Matias.Monday Hello again.

We could not make a mutation to change the parent item id. If you can make an example of a mutation to change a parent item in a sub item.

@Matias.Monday what @taruuuch is looking to do is move a subitem to another item using the API.

Hello @taruuuch,

Ohh so you want to move a subitem to another item using the API.

We do not have a mutation for that, but you can get the information from the subitem with a query and then use the create_subitem method to create a new subitem with the same information in the desired parent item.

Please note that the new subitem will have a different ID from the original one.

Was that the infromation you needed?

PS: Thank you @JCorrell for the help!!

Cheers,
Matias

1 Like

@Matias.Monday This is not suitable for us, as we may have many answers in updates and we will not be able to transfer it. Like this stucture

Hello again @taruuuch,

You can query for the updates and the replies in your subitem like this:

{
  items(ids: 123456789) {
    updates {
      text_body
      replies {
        text_body
      }
    }
  }
}

and then use the create_update method to create the updates and using the “parent_id” parameter with the ID of an update to create the replies for the updates.

There is no method to do it directly.

I hope that helps!

Cheers,
Matias

@Matias.Monday We need to save author of reply, this replies create many users and we need to save it and it structure

Hello again @taruuuch,

As I said, that can not be achieved in the way you want it.

The closest you can do is what I described and you can add in the body of the updates and replies the name of the creator. You can get that information with a query like this one:

{
  items(ids: 1234567890) {
    updates {
      text_body
      creator {
        id
      }
      replies {
        text_body
        creator {
          id
        }
      }
    }
  }
}

Again, that is as close as you can get to what you want to achieve right now.

I hope that helps!

Cheers,
Matias

@Matias.Monday but main question: “Why you can’t add api for change parent item?” You have it on UI but doesnt have in api

@Matias.Monday all of this methods it’s name like “crutch”, not normal method for change parent of item in API

Hello again @taruuuch,

I will add your request towards this method!

Cheers,
Matias

Hello, how much time do you need for release it?

Hello @taruuuch,

The request was created.

It needs to be reviewed and prioritized so I do not have an ETA for it.

Just to set expectations, I would not count on this being released anytime soon.

If it does, it will be announced in our changelog.

Cheers,
Matias

I have the same requirement. I’m curious how your UI does it. I can see that it sends a API call batch_move_to_parent with all the details.

{"pulseIds":[123],"destParentId":345,"subitemsBoardId":678}

If there is no API for moving parents the your backend should be creating a new subitem with all the data isnt it?

Hello there @ravindasenarath and welcome to the community!

As of today the only way of doing this via API would be to query for the subitem’s information and then creating a new subitem in the other parent item. You could then delete the original subitem if needed.

Let us know if you have any other questions!

Cheers,
Matias