[Bug 11203] New: Datatables on parcel.pl do not ignore "stopwords" in titles
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 Bug ID: 11203 Summary: Datatables on parcel.pl do not ignore "stopwords" in titles Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Sorting by the "summary" column does not produce the preferred results. Title beginning with 'a', 'an', or 'the' are sorted using those articles. Test plan: 1) Place an order for 2 items with the titles "Alpha" and "The Alpha", along with some other records with titles starting with something between 'a' and 't', and 't' and 'z' 2) Sort the "pending orders" table, note the incorrect sorting 3) Receive all the items 4) Sort the "already received" table, note the incorrect sorting 5) Apply the patch 6) Repeat steps 1-4, note the corrected sorting -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 22736 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22736&action=edit Bug 11203 - Datatables on parcel.pl do not ignore "stopwords" in titles Sorting by the "summary" column does not produce the preferred results. Title beginning with 'a', 'an', or 'the' are sorted using those articles. Test plan: 1) Place an order for 2 items with the titles "Alpha" and "The Alpha", along with some other records with titles starting with something between 'a' and 't', and 't' and 'z' 2) Sort the "pending orders" table, note the incorrect sorting 3) Receive all the items 4) Sort the "already received" table, note the incorrect sorting 5) Apply the patch 6) Repeat steps 1-4, note the corrected sorting -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22736|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 22818 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22818&action=edit Bug 11203 - Datatables in acqusitions do not ignore "stopwords" in titles Sorting by the "summary" column does not produce the preferred results. Title beginning with 'a', 'an', or 'the' are sorted using those articles. Test plan: 1) Place an order for 2 items with the titles "Alpha" and "The Alpha", along with some other records with titles starting with something between 'a' and 't', and 't' and 'z' 2) Sort the "pending orders" table, note the incorrect sorting 3) Receive all the items 4) Sort the "already received" table, note the incorrect sorting 5) Apply the patch 6) Repeat steps 1-4, note the corrected sorting 7) Check acqui/basket.pl for correct sorting 8) Check acqui/invoice.pl for correct sorting -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Datatables on parcel.pl do |Datatables in acqusitions |not ignore "stopwords" in |do not ignore "stopwords" |titles |in titles -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- How does this work for other languages, die der das etc? Or is it english only? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, there is http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/intranet... which includes a line with the articles that is translatable. I am not sure if that is what gets used with 'anti-the', but it might. Even better than a translatable line would be making this a system preference, so you can change it anytime without having to update the po files. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #4)
Hm, there is http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/intranet... tmpl/prog/en/includes/datatables.inc; h=703d1e3e9637aad3923e2ab2fbe557c2b55869db; hb=e81513199cba41a254820347442719a6fd50ec0b which includes a line with the articles that is translatable. I am not sure if that is what gets used with 'anti-the', but it might. Even better than a translatable line would be making this a system preference, so you can change it anytime without having to update the po files.
Yep, CONFIG_EXCLUDE_ARTICLES_FROM_SORT is the variable that provides the articles. You can see this in "git\koha-tmpl\intranet-tmpl\prog\en\js\datatables.js" It's a modified version of this Datatable plugin: http://datatables.net/plug-ins/sorting#anti_the A system preference might be an idea, although I wonder how that would look? It seems to me that you would need to express quite a few different key->value relationships. Plus, you would need to have translators providing the values for that system preference, at least initially. Would translators be up for that? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #6 from David Cook <dcook@prosentient.com.au> --- Applying: Bug 11203 - Datatables in acqusitions do not ignore "stopwords" in titles Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt Failed to merge in the changes. Patch failed at 0001 Bug 11203 - Datatables in acqusitions do not ignore "stopwords" in titles -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, not sure about "key-value-relationships" - wouldn't it be just a word list? You don't want to sort differently when switching templates, so I think the actual langauge of a word is not needed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #7)
Hm, not sure about "key-value-relationships" - wouldn't it be just a word list? You don't want to sort differently when switching templates, so I think the actual langauge of a word is not needed.
Mmm, good point. I'm trying to think of examples where an article in one language might be a non-article in another language... 'The' is an English article, but 'Thé' is a French noun that we wouldn't want to ignore. I suppose the regex might differentiate letters with diacritics... 'A' is the French preposition 'A'/'à' (often when capitalized, the article doesn't have a diacritic). Tricky. Here is a more comprehensive list of articles in multiple languages... http://library.princeton.edu/departments/tsd/katmandu/catcopy/article.html -- That said, an English install might have records in multiple languages and you would probably want to sort all of them without articles. I don't know if there is a way of offering a 100% consistent sort across languages though. Of course, using the articles of the selected language isn't very consistent either, so I'm tempted to say that the system preference is the best bet. I suppose the system preference could make it easier to deal with problems. If you just have English, you could just use English articles. If you just have French, you could just use French, etc. You might even be able to use a few articles from a few languages. I think French + English would have problems though (because of 'A' and maybe 'The'). German + English also looks like it would have problems. "Die" is a pretty common English noun. "Den" maybe less so, but still. Of course, this is all just from a list. I'd be interested to hear from more native speakers. -- Other problematic words I see: 'as' => Portuguese/Gallegan||Galician 'bat' => Basque 'am' => Gaelic 'den' => Danish/German/Norwegian/Swedish 'die' => Afrikaans/German/Yiddish 'et' => Danish/Norwegian (maybe...) 'he' => Hawaiian 'hen' => Greek 'hi' => Icelandic 'i' => Italian 'in' => Friesian 'it' => Friesian 'nina' => Tagalog 'os' => Portugeuse (both for English OS and the French noun Os) 'to' => Greek (Need a native speaker for this one. I thought 'to' was the Greek pronoun for the English 'it') 'ton' => Greek -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- 'Des' in German is an article, but that's a partitive article in French ('some'/'any' in English) that we probably wouldn't want to ignore. I suppose the ideal system would know the language of the string and ignore the requisite articles, but...in acquisitions we don't necessarily even have a record so it's tough to know the language. Although...I seem to recall seeing a "locale" box somewhere in 3.15 recently...maybe that's something that we should use more of around Koha? I suppose that has the potential to be quite useful or quite messy/difficult though... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I guess you are right, there are some overlaps. A list of words won't ever be perfect, but I think perfect is not really achievable here without going totally overboard :) I think a list of words in a pref would give more flexibility, allow the feature to be deactivated totally or adjusted to each libraries collection. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 --- Comment #11 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #10)
I guess you are right, there are some overlaps. A list of words won't ever be perfect, but I think perfect is not really achievable here without going totally overboard :) I think a list of words in a pref would give more flexibility, allow the feature to be deactivated totally or adjusted to each libraries collection.
Agreed :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11203 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #12 from M. Tompsett <mtompset@hotmail.com> --- Is this left as "Patch doesn't apply" because someone thinks anti-the isn't a good multilingual solution? It's easy enough to rescue if you know which columns need tweaking in parcel.tt, but I'm curious why the delay in saving this. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org