Skip to main content
Solved

Remove assignee

  • November 20, 2020
  • 1 reply
  • 212 views

Nigel O'connell
Pipefy Staff


Hello, is it possible remove an assignee via API? I'm trying to use updateCard https://api-docs.pipefy.com/reference/mutations/updateCard/ without success

Best answer by Marcos Carvalho

Hey Nigel, 

 

If your card has just one assignee, you can run a updateCard mutation with an empty value in the assignee field_value, like this: 

 

mutation{updateCard(input:{id:123456789, assignee_ids:[0]}) {
  clientMutationId
  card{
pipe {
  id
}
assignees {
    id
  }}
}}

 

But it’s important to mention here that this mutation replace any value in the assignee field_value.

So if there’s more than on assignee you must run the mutation with the assignee id you need to keep in the card, excluding the rest of assignee ids.

 

Like this:

 

My card has two assignees: 
 

{
  "data": {
    "card": {
      "assignees": [
        {
          "id": "654321"
        },
        {
          "id": "987654"
        }
      ]
    }
  }
}



But I want to keep just the 987654. So my mutation will be:

mutation{updateCard(input:{id:392042201, assignee_ids:[987654]}) {
  clientMutationId
  card{
pipe {
  id
}
assignees {
    id
  }}
}}

 

Hope it helps you :) 

View original
Did this topic help you find an answer to your question?

1 reply

Marcos Carvalho
Pipefy Staff
Forum|alt.badge.img+6

Hey Nigel, 

 

If your card has just one assignee, you can run a updateCard mutation with an empty value in the assignee field_value, like this: 

 

mutation{updateCard(input:{id:123456789, assignee_ids:[0]}) {
  clientMutationId
  card{
pipe {
  id
}
assignees {
    id
  }}
}}

 

But it’s important to mention here that this mutation replace any value in the assignee field_value.

So if there’s more than on assignee you must run the mutation with the assignee id you need to keep in the card, excluding the rest of assignee ids.

 

Like this:

 

My card has two assignees: 
 

{
  "data": {
    "card": {
      "assignees": [
        {
          "id": "654321"
        },
        {
          "id": "987654"
        }
      ]
    }
  }
}



But I want to keep just the 987654. So my mutation will be:

mutation{updateCard(input:{id:392042201, assignee_ids:[987654]}) {
  clientMutationId
  card{
pipe {
  id
}
assignees {
    id
  }}
}}

 

Hope it helps you :) 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings