twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
17.65k stars 2.09k forks source link

Wrong default value for Task's status #8100

Open BOHEUS opened 4 hours ago

BOHEUS commented 4 hours ago

Scenario:

  1. Log in
  2. Go to Settings > Data model > Tasks > Status

Actual: There's IN_PROGESS value image

Expected: There must be IN_PROGRESS value

For some reason I got errors in logs about wrong value (that's how I found about it) but didn't manage to reproduce it after restarting database

Exception Captured
  {
    operation: { name: 'FindManyTasks', type: 'query' },
    document: 'query FindManyTasks($filter: TaskFilterInput, $orderBy: [TaskOrderByInput], $lastCursor: String, $limit: Int) {\n' +
      '  tasks(filter: $filter, orderBy: $orderBy, first: $limit, after: $lastCursor) {\n' +
      '    edges {\n' +
      '      node {\n' +
      '        __typename\n' +
      '        assignee {\n' +
      '          __typename\n' +
      '          avatarUrl\n' +
      '          colorScheme\n' +
      '          createdAt\n' +
      '          dateFormat\n' +
      '          deletedAt\n' +
      '          id\n' +
      '          locale\n' +
      '          name {\n' +
      '            firstName\n' +
      '            lastName\n' +
      '            __typename\n' +
      '          }\n' +
      '          timeFormat\n' +
      '          timeZone\n' +
      '          updatedAt\n' +
      '          userEmail\n' +
      '          userId\n' +
      '        }\n' +
      '        createdAt\n' +
      '        dueAt\n' +
      '        id\n' +
      '        position\n' +
      '        status\n' +
      '        taskTargets {\n' +
      '          edges {\n' +
      '            node {\n' +
      '              __typename\n' +
      '              task {\n' +
      '                __typename\n' +
      '                id\n' +
      '                title\n' +
      '              }\n' +
      '            }\n' +
      '            __typename\n' +
      '          }\n' +
      '          __typename\n' +
      '        }\n' +
      '        title\n' +
      '      }\n' +
      '      cursor\n' +
      '      __typename\n' +
      '    }\n' +
      '    pageInfo {\n' +
      '      hasNextPage\n' +
      '      hasPreviousPage\n' +
      '      startCursor\n' +
      '      endCursor\n' +
      '      __typename\n' +
      '    }\n' +
      '    totalCount\n' +
      '    __typename\n' +
      '  }\n' +
      '}',
    user: User {
      id: '20202020-9e3b-46d4-a556-88b9ddc2b034',
      firstName: 'Tim',
      lastName: 'Apple',
      email: 'tim@apple.dev',
      defaultAvatarUrl: null,
      emailVerified: false,
      disabled: false,
      passwordHash: '$2b$10$66d.6DuQExxnrfI9rMqOg.U1XIYpagr6Lv05uoWLYbYmtK0HDIvS6',
      canImpersonate: false,
      createdAt: 2024-10-25T16:31:19.234Z,
      updatedAt: 2024-10-25T16:31:19.234Z,
      deletedAt: null,
      defaultWorkspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419'
    }
  }
  [
    BaseGraphQLError [GraphQLError]: Field "" is not defined by type "TaskFilterInput".
        at coerceInputValueImpl (/home/user/Desktop/projects/twenty/node_modules/graphql/utilities/coerceInputValue.js:134:11)
        at coerceInputValue (/home/user/Desktop/projects/twenty/node_modules/graphql/utilities/coerceInputValue.js:32:10)
        at coerceVariableValues (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/values.js:68:65)
        at getVariableValues (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/values.js:19:25)
        at buildExecutionContext (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/execute.js:184:69)
        at execute (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/execute.js:33:24)
        at /home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:81
        at new ValueOrPromise (/home/user/Desktop/projects/twenty/node_modules/value-or-promise/src/ValueOrPromise.ts:35:15)
        at normalizedExecutor (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:12)
        at /home/user/Desktop/projects/twenty/node_modules/@envelop/core/cjs/orchestrator.js:383:33 {
      message: 'Variable "$filter" got invalid value { : { in: ["TODO"] } }; Field "" is not defined by type "TaskFilterInput".',
      path: undefined,
      locations: undefined,
      extensions: {
        code: 'INTERNAL_SERVER_ERROR',
        response: 'Variable "$filter" got invalid value { : { in: ["TODO"] } }; Field "" is not defined by type "TaskFilterInput".'
      }
    }
  ]
Exception Captured
  {
    operation: { name: 'FindManyTasks', type: 'query' },
    document: 'query FindManyTasks($filter: TaskFilterInput, $orderBy: [TaskOrderByInput], $lastCursor: String, $limit: Int) {\n' +
      '  tasks(filter: $filter, orderBy: $orderBy, first: $limit, after: $lastCursor) {\n' +
      '    edges {\n' +
      '      node {\n' +
      '        __typename\n' +
      '        assignee {\n' +
      '          __typename\n' +
      '          avatarUrl\n' +
      '          colorScheme\n' +
      '          createdAt\n' +
      '          dateFormat\n' +
      '          deletedAt\n' +
      '          id\n' +
      '          locale\n' +
      '          name {\n' +
      '            firstName\n' +
      '            lastName\n' +
      '            __typename\n' +
      '          }\n' +
      '          timeFormat\n' +
      '          timeZone\n' +
      '          updatedAt\n' +
      '          userEmail\n' +
      '          userId\n' +
      '        }\n' +
      '        createdAt\n' +
      '        dueAt\n' +
      '        id\n' +
      '        position\n' +
      '        status\n' +
      '        taskTargets {\n' +
      '          edges {\n' +
      '            node {\n' +
      '              __typename\n' +
      '              task {\n' +
      '                __typename\n' +
      '                id\n' +
      '                title\n' +
      '              }\n' +
      '            }\n' +
      '            __typename\n' +
      '          }\n' +
      '          __typename\n' +
      '        }\n' +
      '        title\n' +
      '      }\n' +
      '      cursor\n' +
      '      __typename\n' +
      '    }\n' +
      '    pageInfo {\n' +
      '      hasNextPage\n' +
      '      hasPreviousPage\n' +
      '      startCursor\n' +
      '      endCursor\n' +
      '      __typename\n' +
      '    }\n' +
      '    totalCount\n' +
      '    __typename\n' +
      '  }\n' +
      '}',
    user: User {
      id: '20202020-9e3b-46d4-a556-88b9ddc2b034',
      firstName: 'Tim',
      lastName: 'Apple',
      email: 'tim@apple.dev',
      defaultAvatarUrl: null,
      emailVerified: false,
      disabled: false,
      passwordHash: '$2b$10$66d.6DuQExxnrfI9rMqOg.U1XIYpagr6Lv05uoWLYbYmtK0HDIvS6',
      canImpersonate: false,
      createdAt: 2024-10-25T16:31:19.234Z,
      updatedAt: 2024-10-25T16:31:19.234Z,
      deletedAt: null,
      defaultWorkspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419'
    }
  }
  [
    BaseGraphQLError [GraphQLError]: Field "" is not defined by type "TaskFilterInput".
        at coerceInputValueImpl (/home/user/Desktop/projects/twenty/node_modules/graphql/utilities/coerceInputValue.js:134:11)
        at coerceInputValue (/home/user/Desktop/projects/twenty/node_modules/graphql/utilities/coerceInputValue.js:32:10)
        at coerceVariableValues (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/values.js:68:65)
        at getVariableValues (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/values.js:19:25)
        at buildExecutionContext (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/execute.js:184:69)
        at execute (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/execute.js:33:24)
        at /home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:81
        at new ValueOrPromise (/home/user/Desktop/projects/twenty/node_modules/value-or-promise/src/ValueOrPromise.ts:35:15)
        at normalizedExecutor (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:12)
        at /home/user/Desktop/projects/twenty/node_modules/@envelop/core/cjs/orchestrator.js:383:33 {
      message: 'Variable "$filter" got invalid value { : { is: "NULL" } }; Field "" is not defined by type "TaskFilterInput".',
      path: undefined,
      locations: undefined,
      extensions: {
        code: 'INTERNAL_SERVER_ERROR',
        response: 'Variable "$filter" got invalid value { : { is: "NULL" } }; Field "" is not defined by type "TaskFilterInput".'
      }
    }
  ]
Exception Captured
  {
    operation: { name: 'FindManyTasks', type: 'query' },
    document: 'query FindManyTasks($filter: TaskFilterInput, $orderBy: [TaskOrderByInput], $lastCursor: String, $limit: Int) {\n' +
      '  tasks(filter: $filter, orderBy: $orderBy, first: $limit, after: $lastCursor) {\n' +
      '    edges {\n' +
      '      node {\n' +
      '        __typename\n' +
      '        assignee {\n' +
      '          __typename\n' +
      '          avatarUrl\n' +
      '          colorScheme\n' +
      '          createdAt\n' +
      '          dateFormat\n' +
      '          deletedAt\n' +
      '          id\n' +
      '          locale\n' +
      '          name {\n' +
      '            firstName\n' +
      '            lastName\n' +
      '            __typename\n' +
      '          }\n' +
      '          timeFormat\n' +
      '          timeZone\n' +
      '          updatedAt\n' +
      '          userEmail\n' +
      '          userId\n' +
      '        }\n' +
      '        createdAt\n' +
      '        dueAt\n' +
      '        id\n' +
      '        position\n' +
      '        status\n' +
      '        taskTargets {\n' +
      '          edges {\n' +
      '            node {\n' +
      '              __typename\n' +
      '              task {\n' +
      '                __typename\n' +
      '                id\n' +
      '                title\n' +
      '              }\n' +
      '            }\n' +
      '            __typename\n' +
      '          }\n' +
      '          __typename\n' +
      '        }\n' +
      '        title\n' +
      '      }\n' +
      '      cursor\n' +
      '      __typename\n' +
      '    }\n' +
      '    pageInfo {\n' +
      '      hasNextPage\n' +
      '      hasPreviousPage\n' +
      '      startCursor\n' +
      '      endCursor\n' +
      '      __typename\n' +
      '    }\n' +
      '    totalCount\n' +
      '    __typename\n' +
      '  }\n' +
      '}',
    user: User {
      id: '20202020-9e3b-46d4-a556-88b9ddc2b034',
      firstName: 'Tim',
      lastName: 'Apple',
      email: 'tim@apple.dev',
      defaultAvatarUrl: null,
      emailVerified: false,
      disabled: false,
      passwordHash: '$2b$10$66d.6DuQExxnrfI9rMqOg.U1XIYpagr6Lv05uoWLYbYmtK0HDIvS6',
      canImpersonate: false,
      createdAt: 2024-10-25T16:31:19.234Z,
      updatedAt: 2024-10-25T16:31:19.234Z,
      deletedAt: null,
      defaultWorkspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419'
    }
  }
  [
    BaseGraphQLError [GraphQLError]: Field "" is not defined by type "TaskFilterInput".
        at coerceInputValueImpl (/home/user/Desktop/projects/twenty/node_modules/graphql/utilities/coerceInputValue.js:134:11)
        at coerceInputValue (/home/user/Desktop/projects/twenty/node_modules/graphql/utilities/coerceInputValue.js:32:10)
        at coerceVariableValues (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/values.js:68:65)
        at getVariableValues (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/values.js:19:25)
        at buildExecutionContext (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/execute.js:184:69)
        at execute (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/execute.js:33:24)
        at /home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:81
        at new ValueOrPromise (/home/user/Desktop/projects/twenty/node_modules/value-or-promise/src/ValueOrPromise.ts:35:15)
        at normalizedExecutor (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:12)
        at /home/user/Desktop/projects/twenty/node_modules/@envelop/core/cjs/orchestrator.js:383:33 {
      message: 'Variable "$filter" got invalid value { : { in: ["DONE"] } }; Field "" is not defined by type "TaskFilterInput".',
      path: undefined,
      locations: undefined,
      extensions: {
        code: 'INTERNAL_SERVER_ERROR',
        response: 'Variable "$filter" got invalid value { : { in: ["DONE"] } }; Field "" is not defined by type "TaskFilterInput".'
      }
    }
  ]
Exception Captured
  {
    operation: { name: 'FindManyTasks', type: 'query' },
    document: 'query FindManyTasks($filter: TaskFilterInput, $orderBy: [TaskOrderByInput], $lastCursor: String, $limit: Int) {\n' +
      '  tasks(filter: $filter, orderBy: $orderBy, first: $limit, after: $lastCursor) {\n' +
      '    edges {\n' +
      '      node {\n' +
      '        __typename\n' +
      '        assignee {\n' +
      '          __typename\n' +
      '          avatarUrl\n' +
      '          colorScheme\n' +
      '          createdAt\n' +
      '          dateFormat\n' +
      '          deletedAt\n' +
      '          id\n' +
      '          locale\n' +
      '          name {\n' +
      '            firstName\n' +
      '            lastName\n' +
      '            __typename\n' +
      '          }\n' +
      '          timeFormat\n' +
      '          timeZone\n' +
      '          updatedAt\n' +
      '          userEmail\n' +
      '          userId\n' +
      '        }\n' +
      '        createdAt\n' +
      '        dueAt\n' +
      '        id\n' +
      '        position\n' +
      '        status\n' +
      '        taskTargets {\n' +
      '          edges {\n' +
      '            node {\n' +
      '              __typename\n' +
      '              task {\n' +
      '                __typename\n' +
      '                id\n' +
      '                title\n' +
      '              }\n' +
      '            }\n' +
      '            __typename\n' +
      '          }\n' +
      '          __typename\n' +
      '        }\n' +
      '        title\n' +
      '      }\n' +
      '      cursor\n' +
      '      __typename\n' +
      '    }\n' +
      '    pageInfo {\n' +
      '      hasNextPage\n' +
      '      hasPreviousPage\n' +
      '      startCursor\n' +
      '      endCursor\n' +
      '      __typename\n' +
      '    }\n' +
      '    totalCount\n' +
      '    __typename\n' +
      '  }\n' +
      '}',
    user: User {
      id: '20202020-9e3b-46d4-a556-88b9ddc2b034',
      firstName: 'Tim',
      lastName: 'Apple',
      email: 'tim@apple.dev',
      defaultAvatarUrl: null,
      emailVerified: false,
      disabled: false,
      passwordHash: '$2b$10$66d.6DuQExxnrfI9rMqOg.U1XIYpagr6Lv05uoWLYbYmtK0HDIvS6',
      canImpersonate: false,
      createdAt: 2024-10-25T16:31:19.234Z,
      updatedAt: 2024-10-25T16:31:19.234Z,
      deletedAt: null,
      defaultWorkspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419'
    }
  }
  [
    BaseGraphQLError [GraphQLError]: Field "" is not defined by type "TaskFilterInput".
        at coerceInputValueImpl (/home/user/Desktop/projects/twenty/node_modules/graphql/utilities/coerceInputValue.js:134:11)
        at coerceInputValue (/home/user/Desktop/projects/twenty/node_modules/graphql/utilities/coerceInputValue.js:32:10)
        at coerceVariableValues (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/values.js:68:65)
        at getVariableValues (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/values.js:19:25)
        at buildExecutionContext (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/execute.js:184:69)
        at execute (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/execute.js:33:24)
        at /home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:81
        at new ValueOrPromise (/home/user/Desktop/projects/twenty/node_modules/value-or-promise/src/ValueOrPromise.ts:35:15)
        at normalizedExecutor (/home/user/Desktop/projects/twenty/node_modules/graphql-yoga/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:12)
        at /home/user/Desktop/projects/twenty/node_modules/@envelop/core/cjs/orchestrator.js:383:33 {
      message: 'Variable "$filter" got invalid value { : { in: ["IN_PROGESS"] } }; Field "" is not defined by type "TaskFilterInput".',
      path: undefined,
      locations: undefined,
      extensions: {
        code: 'INTERNAL_SERVER_ERROR',
        response: 'Variable "$filter" got invalid value { : { in: ["IN_PROGESS"] } }; Field "" is not defined by type "TaskFilterInput".'
      }
    }
  ]
sans-byte commented 3 hours ago

I would like to work on this Please assign this to me @Bonapara