Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFC] Failing test for api chain using sequential #23675

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

demeritcowboy
Copy link
Contributor

Overview

Failing test for #23672

It will pass now though since 23672 is merged.

This is the same type of call uscounties makes.

@seamuslee001 @totten @eileenmcnaughton

@civibot
Copy link

civibot bot commented Jun 2, 2022

(Standard links)

@civibot civibot bot added the master label Jun 2, 2022
@eileenmcnaughton
Copy link
Contributor

you are amazing @demeritcowboy

'api.Address.getoptions' => [
'field' => 'state_province_id',
'country_id' => '$value.id',
'sequential' => 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@demeritcowboy you could have left sequential off here just to demonstrate that sequential gets added in by default but 6/1 0.5/12

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I'll just add a third case.

]);
$this->assertSame(['key' => 1000, 'value' => 'Alabama'], $result['api.Address.getoptions']['values'][0]);
$this->assertSame(['key' => 1001, 'value' => 'Alaska'], $result['api.Address.getoptions']['values'][1]);
$this->assertSame(['key' => 1049, 'value' => 'Wyoming'], $result['api.Address.getoptions']['values'][59]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are there 59 Keys here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there are some territories like American Samoa that aren't technically states.

Copy link
Contributor

@eileenmcnaughton eileenmcnaughton Jun 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But they shoud be - the revolution starts here. Equal rights for all civicrm_state_province rows

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's come up for sure in some places like Puerto Rico. It's even come up in Canada.

@eileenmcnaughton eileenmcnaughton merged commit dff6bb3 into civicrm:master Jun 3, 2022
@demeritcowboy demeritcowboy deleted the test-sequential branch June 3, 2022 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants