Skip to content

Conversation

samgavinio
Copy link
Contributor

@samgavinio samgavinio commented Feb 9, 2017

/cc @zendesk/mintegrations

Description

Skips an unnecessary call to the search api for when the order_field_id config is not set. When order_field_id is not set, the method affected in this PR will return false anyway so might as well not make that API call.

Also improves the search API call by making use of the fieldValue search criteria.

References

Risks

  • [low] Touched search API call, a small change in the query string.

@samgavinio samgavinio changed the title Skip unnecessary api call if no custom ticket field is set. [MI-1321] Skip unnecessary api call if no custom ticket field is set. Feb 9, 2017
public function forOrder($orderIncrementId)
{
$fieldId = Mage::getStoreConfig('zendesk/frontend_features/order_field_id');
if(! $fieldId) {

Choose a reason for hiding this comment

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

is the extra space intended?

@samgavinio samgavinio force-pushed the samgavinio/MI-1321-order-tickets-bug branch from e03277f to 7dd9877 Compare February 10, 2017 05:19
@samgavinio
Copy link
Contributor Author

@jmramos02 💇‍♂️

@samgavinio samgavinio merged commit b42fea7 into master Feb 10, 2017
@samgavinio samgavinio deleted the samgavinio/MI-1321-order-tickets-bug branch February 10, 2017 06:14
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.

3 participants