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

Journal transaction ID sorting bug, issue #992 #1610

Merged
merged 1 commit into from
May 8, 2017

Conversation

troyev
Copy link
Contributor

@troyev troyev commented May 7, 2017

It appears there were two main issues: one being that the sorting functions were not exposed correctly, so Undefined was passed to grid-ui, and two being that the sorting function didn't seem to be correct for strings like "HEV142 (2)".

Let me know your thoughts on the changes and if they work for you.

@troyev troyev changed the title Journal transaction ID sorting bug, issue #992 #992 Journal transaction ID sorting bug, issue May 7, 2017
@troyev troyev changed the title #992 Journal transaction ID sorting bug, issue Journal transaction ID sorting bug, issue #992 May 7, 2017
@jniles jniles added the Bug Fix label May 8, 2017
Copy link
Collaborator

@jniles jniles left a comment

Choose a reason for hiding this comment

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

@troyev, great work! I've pulled this locally and the changes work well in both "transaction mode" (grouped) and ungrouped mode. This is really helpful, thanks!

@@ -83,10 +59,11 @@ function GridSortingService(util) {
// global sorting configuration
gridOptions.enableSorting = true;

this.transactionIds = transactionIds;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Much clearer, thanks! 👍

var nullValuesResult = this.gridApi.core.sortHandleNulls(a, b);
// determine integer (reference) value by extracting it from the transaction ID
// match returns an array of mathces - take the first element
first = Number(/[a-z,A-Z]*([0-9]*)/g.exec(a)[1]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The comments are highly appreciated!

@jniles jniles merged commit 71206e2 into IMA-WorldHealth:master May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants