API: duplicate an item BUT keep people and status values

Hello,

I’m using the duplicate_item mutation of the API with Python to duplicate an item on a board. This is my simple code:

def duplicate_item(board_id: str, item_id: int):
    query = '''
    mutation {
        duplicate_item (
            board_id: %s,
            item_id: %s
        ) {
            id
        }
    }
    ''' % (board_id, item_id)
    response = requests.post(url=MONDAY_URL, json={'query': query}, headers=monday_headers)

This works well.
However, the item has a status column and 2 people columns.
The status column and 1 people column have a default value (that I set on the default view) and the other people column hasn’t a default value.
When duplicating the item, the status is set to the default value and both people columns are empty.

How can I keep all the values (including status and people columns values) of the item when duplicating it?

I’d be happy to get your help!

Antoine

Hello there @twan,

Let me know if I understand this:

  1. You have board A and board B
  2. You are duplicating an item from board A, into board B
  3. In board B you have some default values set for one of the people column and the status column
  4. When you duplicate via API the duplicated item gets created in board B, the status is NOT the one from the original item, but instead the default value appears, and both people columns are empty.

If this is accurate, please send an email to appsupport@monday.com explaining the issue and if you can, please add a screen recording showing the steps you are taking and the result you see.

We can take a closer look from there and open a report for our R&D team if needed.

Looking forward to hearing from you!

Cheers,
Matias

Hello Matias,

Thank you for your response.

You’re mostly correct, except I have only one board. I duplicate an item from board A to board A.
Your description in the 4th point is accurate; that’s exactly what happens.

However, I will send an email.

Regards,
Antoine

Hello again @twan,

Sounds good! Talk to you via email then!

Cheers,
Matias