Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Customers should be able to save the optional region while config option Allow to Choose State if It is Optional for Country is set to Yes only #1032

Closed
TomashKhamlai opened this issue Oct 28, 2019 · 3 comments
Labels
bug Something isn't working Component: CustomerGraphQl

Comments

@TomashKhamlai
Copy link
Contributor

TomashKhamlai commented Oct 28, 2019

Preconditions (*)

  1. No preconditions

Steps to reproduce (*)

Customers should be able to save the optional region while config option Allow to Choose State if It is Optional for Country is set to Yes only

  1. Navigate to Store -> Settings -> Configuration -> General -> General -> State Options
  2. Find United States on the list. Press <Ctrl> or <Cmd> and remove the United States from the selection.
  3. Change value for the Allow to Choose State if It is Optional for Country option to No and save the configuration.
  4. Flush cache
  5. Perform mutation as a Customer
mutation {
  createCustomerAddress(
    input: {
      country_code: US
      firstname: "John"
      lastname: "Doe"
      city: "Culver City"
      region: {
        region_code: "CA"
        region_id: 12
        region: "California"
      }
      street: [
        "6161 West Centinella Avenue"
      ]
      postcode: "90230"
      telephone: "+1 555 555 5555"
      default_billing: true
      default_shipping: true
    }
  ) {
    country_code
    firstname
    lastname
    city
    region {
      region
      region_code
    }
    street
    postcode
    telephone
    default_billing
    default_shipping
  }
}

Expected result:
✔️ validation or region ignorance

Actual result:
❌ Region is present in the address
image

@TomashKhamlai
Copy link
Contributor Author

@lenaorobei, please confirm or modify expectations.

@lenaorobei
Copy link
Contributor

@TomashKhamlai please check latest 2.3-develop. This issue should be fixed.

@TomashKhamlai

This comment has been minimized.

@TomashKhamlai TomashKhamlai added bug Something isn't working and removed for-grooming This issue needs to be discussed before it can be worked on labels Nov 13, 2019
@TomashKhamlai TomashKhamlai changed the title Region is not listed in the array of errors while region is required by config for countries with predefined regions Customers should be able to save the optional region while config option Allow to Choose State if It is Optional for Country is set to Yes only Nov 13, 2019
@lenaorobei lenaorobei added the Event: cd19kharkiv Contribution Day 2019 Kharkiv label Nov 21, 2019
@lenaorobei lenaorobei removed the Event: cd19kharkiv Contribution Day 2019 Kharkiv label Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Component: CustomerGraphQl
Projects
None yet
Development

No branches or pull requests

2 participants