Internal Server Error:500 (Week Column)

I am using change_multiple_column_values mutation for updating column values but while updating the “week” column value through API, I am continuously getting internal server error, it is blocking development. Can anyone please clarify what is wrong with the following query.

mutation{change_multiple_column_values (board_id:xxxxx,item_id:xxxxx,column_values:"{\"week\":{\"week\":{\"startDate\":\"2020-12-12\",\"endDate\":\"2020-12-19\"}}}") {id}}

Thank you.

Hey @krishna

Seems like {\"week\" is added twice in the mutation

mutation{change_multiple_column_values (board_id:xxxxx,item_id:xxxxx,column_values:“{"week":{"week":{"startDate":"2020-12-12","endDate":"2020-12-19"}}}”) {id}}

Please try this instead -

mutation {
  change_multiple_column_values(board_id: xxxxx, item_id: xxxxx, column_values: "{\"week\":{\"startDate\":\"2020-12-12\",\"endDate\":\"2020-12-19\"}}") {
    id
  }
}

Thank you !!

Hi @upitchika,

Thanks for the response but first “week” is column_id and next complete week object is it’s value.

I might be wrong…because by removing week…did not receive any error but the column value is not getting updated(it is storing empty value).

image

Hey @krishna,

You are correct, you should include “week” twice, as one represents the id.

I just reviewed the API guide and here’s the catch to mutate week column -

Date must be 7 days apart (inclusive of the first and last date) and start at the beginning of the work week defined in the account.

As per these rules, please check the following items in your mutation -

  1. Is the account’s work week between “2020-12-12” and “2020-12-19” (unlikely)
  2. In those 7 days, first & last days are inclusive. Seems like you are counting an extra day.

I tried this with my test account and following these 2 rules successfully updated the week column.

This is the query I used

mutation {
  change_multiple_column_values(board_id: xxxx, item_id: xxxx, column_values: "{\"week\":{\"week\":{\"startDate\":\"2020-09-14\",\"endDate\":\"2020-09-20\"}}}") {
    id
  }
}

image

When I didn’t follow those 2 rules I got HTTP 500 Internal Server Error which isn’t ideal. This definitely needs a better error message. Hey @AlexSavchuk, FYI, do you think you can convey this to the dev team ?

Thank you !!

4 Likes

Thanks @upitchika It worked!! :blush: However as you said a better error message would have made things easy.

1 Like

Hey there @krishna and @upitchika

Really nice job resolving this together! That’s an awesome mutual effort from both of you and I appreciate your help with this one, @upitchika.

The 500 Errors are definitely a confusing point for a lot of our users, and I appreciate your feedback about this particular column type too. I’ve passed the case on to the team and we’ll take it into further account when planning the next steps from here :slight_smile:

-Alex

I agree with @AlexSavchuk, very good job @upitchika and @krishna. :ok_hand:

1 Like