alkem-io / client-web

Default web frontend, enabling browsing the Alkemio platform - so the hosted Challenges and communities collaborating around those Challenges.
https://alkem.io
European Union Public License 1.2
15 stars 6 forks source link

BUG: Cannot create organisation (property textID has failed the following constraints: maxLength) #548

Closed pimotte closed 3 years ago

pimotte commented 3 years ago

Describe the bug When creating an organisation, the error DTO validation for class OrganisationInput { } failed! An instance of OrganisationInput has failed the validation: - property textID has failed the following constraints: maxLength appears.

To Reproduce Steps to reproduce the behavior:

  1. Log in as admin
  2. Click on '...'
  3. Click to admin
  4. Create new organisation
  5. Fill in anything as name
  6. See error

Expected behavior The organisation to be created.

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

Additional context Curl command for the specific request that causes the error (ips refer to our live environment, I removed my auth token)

curl 'http://143.198.248.211:4003/graphql' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: http://161.35.247.80/' -H 'content-type: application/json' -H 'Origin: http://161.35.247.80' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data-raw '{"operationName":"createOrganization","variables":{"organisationData":{"name":"Digicampus","profileData":{"avatar":"","description":"","referencesData":[],"tagsetsData":[{"name":"skills","tags":[]},{"name":"keywords","tags":[]}]}}},"query":"mutation createOrganization($organisationData: OrganisationInput!) {\n  createOrganisation(organisationData: $organisationData) {\n    id\n    name\n    __typename\n  }\n}\n"}'
welcome[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

techsmyth commented 3 years ago

shows that we need full regression test suites on the client...

fyi - have just fully reworked all mutations on the server, and one of those updates was to add mandatory textID also for the organisations - UI still needs to be updated to request + send that string.

If you need a workaround you can create the org directly using the graphql api @ localhost:4000/graphql:

mutation CreateOrganisation($organisationData: CreateOrganisationInput!) { createOrganisation(organisationData: $organisationData) { name, members { name } } }

query variables: { "organisationData": { "name": "Cherrytwist", "textID": "ct11" } }

pimotte commented 3 years ago

Yeah, figured it was something like that. For now we're going to fill this using the populator, which should work, right?

techsmyth commented 3 years ago

Being updated as we speak, should be a refreshed version later today. Chat thru later...

Sent from my iPhone

On 14 Apr 2021, at 11:22, Pim Otte @.***> wrote:

 Yeah, figured it was something like that. For now we're going to fill this using the populator, which should work, right?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.