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

Fix queryForCurrentValue #433

Merged
merged 6 commits into from
Jun 16, 2017
Merged

Conversation

sophypal
Copy link
Contributor

This project uses semver, please check the scope of this pr:

  • #none# - documentation fixes and/or test additions
  • #patch# - backwards-compatible bug fix
  • #minor# - adding functionality in a backwards-compatible manner
  • #major# - incompatible API change

CHANGELOG

  • Fixed a bug with the queryForCurrentValue select option which assumed the id was at the top level of the form's value.

@@ -663,7 +667,7 @@ describe('Unit: list-utils', function () {
valueAttribute: 'secret',
query: {
booleanFlag: true,
universe: '${../universe}'
universe: '${./universe}'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

${./universe} is correct as the findValue utility in bunsen-core doesn't behave like the path format followed by conditions. Oddly enough, both ../ and ./ will both succeed when the value object is one-level deep.

@@ -135,7 +135,7 @@ export function getItemsFromAjaxCall ({ajax, bunsenId, data, filter, options, va
export function getItemsFromEmberData (value, modelDef, data, bunsenId, store, filter) {
const modelType = modelDef.modelType || 'resources'
const {labelAttribute, queryForCurrentValue, valueAttribute} = modelDef
const valueAsId = value[bunsenId]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have to believe this was an oversight as most models aren't this flat.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 53c361d on sophypal:fix-mcp-issues into ** on ciena-frost:14.23.x**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 53c361d on sophypal:fix-mcp-issues into ** on ciena-frost:14.23.x**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 08f3f74 on sophypal:fix-mcp-issues into ** on ciena-frost:14.23.x**.

@sophypal
Copy link
Contributor Author

sophypal commented Jun 16, 2017

👍

Approved with PullApprove

@sophypal sophypal merged commit be702ed into ciena-frost:14.23.x Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants