Bugzilla – Attachment 32665 Details for
Bug 8837
Dewey cn_sort inaccurate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 8837 - Dewey cn_sort inaccurate
PASSED-QA-Bug-8837---Dewey-cnsort-inaccurate.patch (text/plain), 2.08 KB, created by
Kyle M Hall (khall)
on 2014-10-24 13:38:30 UTC
(
hide
)
Description:
[PASSED QA] Bug 8837 - Dewey cn_sort inaccurate
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-10-24 13:38:30 UTC
Size:
2.08 KB
patch
obsolete
>From c10f84ef9f71438f46ce74f617d71828ee438cdc Mon Sep 17 00:00:00 2001 >From: simith <simith@inlibro.com> >Date: Wed, 6 Aug 2014 09:11:47 -0400 >Subject: [PATCH] [PASSED QA] Bug 8837 - Dewey cn_sort inaccurate > >This patch fix the cn_sort sorting accurace described by Joy Nelson. > >Testing: > >I) Appy the bug 12424 patch > >Before applying this patch: >0) Select 3 items. >1) Edit the items selected >2) Change "Full call number" option to 971/P23w/v.1-2/pt.8, 971.01/P23w/v.1-2/pt.6-7 and 971.01/P23w/v.1-2/pt.7 >3) Save changes >4) Valide 971P23WV_12PT_8_000000000000000, 971_000000000000000_01P23WV_12PT_67 and 971_01P23WV_12PT_700000000000000 (table items - cn_sort column). > >After applying this patch: >5) Edit again the item selected in 0 >3) Save changes >4) Valide 971_000000000000000_P23W_V_12_PT_8, 971_010000000000000_P23W_V_12_PT_67, 971_010000000000000_P23W_V_12_PT_7 (table items - cn_sort column). > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/ClassSortRoutine/Dewey.pm | 9 +++++++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/C4/ClassSortRoutine/Dewey.pm b/C4/ClassSortRoutine/Dewey.pm >index 25480ec..3b24650 100644 >--- a/C4/ClassSortRoutine/Dewey.pm >+++ b/C4/ClassSortRoutine/Dewey.pm >@@ -63,6 +63,7 @@ sub get_class_sort_key { > my $init = uc "$cn_class $cn_item"; > $init =~ s/^\s+//; > $init =~ s/\s+$//; >+ $init =~ s/\// /g; > $init =~ s!/!!g; > $init =~ s/^([\p{IsAlpha}]+)/$1 /; > my @tokens = split /\.|\s+/, $init; >@@ -75,8 +76,12 @@ sub get_class_sort_key { > $first_digit_group_idx = $i; > } > if (2 == $digit_group_count) { >- $tokens[$i] = sprintf("%-15.15s", $tokens[$i]); >- $tokens[$i] =~ tr/ /0/; >+ if ($i - $first_digit_group_idx == 1) { >+ $tokens[$i] = sprintf("%-15.15s", $tokens[$i]); >+ $tokens[$i] =~ tr/ /0/; >+ } else { >+ $tokens[$first_digit_group_idx] .= '_000000000000000' >+ } > } > } > } >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8837
:
30554
|
32413
| 32665 |
32666