Bug 10430 - status filter not working in serial claims when translated
Summary: status filter not working in serial claims when translated
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Fridolin Somers
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-07 13:15 UTC by Fridolin Somers
Modified: 2014-05-26 21:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed patch (4.18 KB, patch)
2013-06-07 13:25 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 10430 - status filter not working in serial claims when translated (4.23 KB, patch)
2013-08-08 21:49 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 10430 - status filter not working in serial claims when translated (4.44 KB, patch)
2013-08-25 16:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10430 - arrived and stopped status are not possible in serial claim (2.02 KB, patch)
2013-08-28 13:39 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2013-06-07 13:15:15 UTC
Whis a translated intranet (ie fr-FR) the status filter does not work for "Late" status.
It is because status in combobox filter is translated "Retard" and status in table is translated "En retard".
We could change translation but it would be better if filter did not work on status name.
Comment 1 Fridolin Somers 2013-06-07 13:16:01 UTC
[With] a translated intranet. Sorry :)
Comment 2 Fridolin Somers 2013-06-07 13:19:15 UTC
I also created Bug 10429 for branch filter
Comment 3 Fridolin Somers 2013-06-07 13:25:10 UTC Comment hidden (obsolete)
Comment 4 Fridolin Somers 2013-06-21 14:42:41 UTC
I update to major importance because many libraries have reported this bug.
Comment 5 Chris Cormack 2013-06-23 07:03:10 UTC
Should we be using a class, and then selecting on a class when we could/should be using and id?
Comment 6 Fridolin Somers 2013-06-24 07:42:29 UTC
I used a class because there are several cells to identify ; an id must be unique.
Comment 7 Fridolin Somers 2013-08-05 14:41:57 UTC
I set back to Need Signoff.
The QA validation will say if using a class is correct.
Comment 8 Chris Cormack 2013-08-08 21:49:28 UTC Comment hidden (obsolete)
Comment 9 Chris Cormack 2013-08-08 21:50:26 UTC
You do realise I am on the QA team right? However I have signed off, someone elses problem now.
Comment 10 Fridolin Somers 2013-08-09 07:56:40 UTC
(In reply to Chris Cormack from comment #9)
> You do realise I am on the QA team right?
Yes sorry, of course I know it, I surly had an amnesia moment.

In fact I do not understand how it could use an id. Could you give a piece of code ?

Looking at Bug 10429 it appears there are several bugs on those filters. They all could be solved by using a JQuery Datatable for claims table.
Comment 11 Katrin Fischer 2013-08-25 16:12:46 UTC
This patch works nicely and the classes are correct, as every status can show up multiple times in this table. 

But I am a bit confused about "Arrived" and "Stopped" showing up in this list. 
I checked the code and I think the pull down of filters should only have: Missing, Expected, Late, and Claimed.

-----

=head2 GetLateOrMissingIssues
...
AND (serial.STATUS = 4 OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7))

From the reports help:
    1 = Expected
    2 = Arrived
    3 = Late
    4 = Missing
    5 = Not Available
    6 = Delete
    7 = Claimed
    8 = Stopped

This patch only adds 'Stopped', the other status have been there before. I think this can be fixed in a follow up.
Comment 12 Katrin Fischer 2013-08-25 16:16:35 UTC
Created attachment 20588 [details] [review]
[PASSED QA] Bug 10430 - status filter not working in serial claims when translated

With a translated intranet (ie fr-FR) the status filter does not work for "Late" status.
It is because status in combobox filter is translated "Retard" and status in table is translated "En retard".

This patch changed javascript filter to work on a status code instead of status name.
The new classes may be used to change CSS depending on status.

Test plan :
- Use a translated intranet (ie fr-FR)
- Go to serials claim of a vendor with issues of multiple status
- Check that status filter does its work

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch passes all tests and QA script.
The status filter should probably be changed to only
allow filtering on status that can appear on the page.
Comment 13 Fridolin Somers 2013-08-28 13:39:37 UTC
Created attachment 20704 [details] [review]
Bug 10430 - arrived and stopped status are not possible in serial claim

Follow up to remove arrived and stopped status, as asked.
Comment 14 Fridolin Somers 2013-08-28 13:41:56 UTC
(In reply to Katrin Fischer from comment #11)
> I think this can be fixed in a follow up.

I added follow-up but did not change the bug status. I let you manage it.
Comment 15 Galen Charlton 2013-10-09 04:30:45 UTC
Pushed to master.  Thanks, Fridolyn!
Comment 16 Tomás Cohen Arazi (tcohen) 2013-11-19 18:02:05 UTC
This patch has been pushed to 3.12.x, will be in 3.12.7.

Thanks Fridolyn!