[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-07-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

Katrin Fischer  changed:

   What|Removed |Added

 CC||arthur.suz...@biblibre.com

--- Comment #8 from Katrin Fischer  ---
Hi Arthur, could you check this one for backporting please?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

--- Comment #7 from Fridolin Somers  ---
Pushed to master for 22.05, thanks to everybody involved 濾

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

Fridolin Somers  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to master
 Version(s)||22.05.00
released in||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

--- Comment #6 from Fridolin Somers  ---
Indeed, the code is weired.
Maybe should be completely revamped with ORM.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

Martin Renvoize  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA
 CC||martin.renvoize@ptfs-europe
   ||.com

--- Comment #5 from Martin Renvoize  ---
I would have loved to see some of this moved up into module code and unit
tested.. but it does resolve the issue here and I feel asking for such a move
at this time would be a bit above an beyond.

So, working as expected, no regressions found and QA script is happy.

Passing QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #134971|0   |1
is obsolete||

--- Comment #4 from Martin Renvoize  ---
Created attachment 134994
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134994=edit
Bug 30735: Fix filtering by patron attribute with AV in overdues report

In Circulation > Overdues, if there are seachable patron attributes
they can be used in left filters. Search does not work if this attribute
is linked to an authorized values category.

The problem is that AV code is compared to the AV desciption in :
  if (grep { $attrval eq lc($_->[1]) } @{ $pattrs->{$code} }) {

Looking at a Data::Dumper of the var $pattrs you see for example :
$VAR1 = {
  'ATT1' => [
  [
'afr',
'Afrikaans'
  ]
]
};
First row is attribute code and second row is desciption.
It works for an attribute without AV because in this case
'avdescription' is undefined so code is stored as description :
  push @{ $pattrs->{$row->{attrcode}} }, [
$row->{attrval},
defined $row->{avdescription} ? $row->{avdescription} :
$row->{attrval},
];

This patch fixes the code and removes commented line.
Also reviews the SQL query :
  - avcategory is useless
  - use alias attrcode for borrower_attributes.code to be more explicit

Test plan :
1) Create a patron A with overdues
2) Go to Circulation > Overdues
3) Check you see the patron A
4) Create a patron attribute, searchable, with an authorized value
   category, ie LANG
5) Edit patron A to set a value in this attribute
6) Go to Circulation > Overdues
7) Select attribute value and apply filter
8) Check you see the patron A
9) Redo test plan with a patron attribute, searchable, without an
   authorized value category

Signed-off-by: Owen Leonard 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

Owen Leonard  changed:

   What|Removed |Added

 Attachment #134905|0   |1
is obsolete||

--- Comment #3 from Owen Leonard  ---
Created attachment 134971
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134971=edit
Bug 30735: Fix filtering by patron attribute with AV in overdues report

In Circulation > Overdues, if there are seachable patron attributes
they can be used in left filters. Search does not work if this attribute
is linked to an authorized values category.

The problem is that AV code is compared to the AV desciption in :
  if (grep { $attrval eq lc($_->[1]) } @{ $pattrs->{$code} }) {

Looking at a Data::Dumper of the var $pattrs you see for example :
$VAR1 = {
  'ATT1' => [
  [
'afr',
'Afrikaans'
  ]
]
};
First row is attribute code and second row is desciption.
It works for an attribute without AV because in this case
'avdescription' is undefined so code is stored as description :
  push @{ $pattrs->{$row->{attrcode}} }, [
$row->{attrval},
defined $row->{avdescription} ? $row->{avdescription} :
$row->{attrval},
];

This patch fixes the code and removes commented line.
Also reviews the SQL query :
  - avcategory is useless
  - use alias attrcode for borrower_attributes.code to be more explicit

Test plan :
1) Create a patron A with overdues
2) Go to Circulation > Overdues
3) Check you see the patron A
4) Create a patron attribute, searchable, with an authorized value
   category, ie LANG
5) Edit patron A to set a value in this attribute
6) Go to Circulation > Overdues
7) Select attribute value and apply filter
8) Check you see the patron A
9) Redo test plan with a patron attribute, searchable, without an
   authorized value category

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

Owen Leonard  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

--- Comment #2 from Fridolin Somers  ---
Created attachment 134905
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134905=edit
Bug 30735: Fix filtering by patron attribute with AV in overdues report

In Circulation > Overdues, if there are seachable patron attributes they can be
used in left filters.
Search does not work if this attribute is linked to an authorized values
category.

The problem is that AV code is compared to the AV desciption in :
  if (grep { $attrval eq lc($_->[1]) } @{ $pattrs->{$code} }) {

Looking at a Data::Dumper of the var $pattrs you see for example :
$VAR1 = {
  'ATT1' => [
  [
'afr',
'Afrikaans'
  ]
]
};
First row is attribute code and second row is desciption.
It works for an attribute without AV because in this case
'avdescription' is undefined so code is stored as description :
  push @{ $pattrs->{$row->{attrcode}} }, [
$row->{attrval},
defined $row->{avdescription} ? $row->{avdescription} :
$row->{attrval},
];

This patch fixes the code and removes commented line.
Also reviews the SQL query :
  - avcategory is useless
  - use alias attrcode for borrower_attributes.code to be more explicit

Test plan :
1) Create a patron A with overdues
2) Go to Circulation > Overdues
3) Check you see the patron A
4) Create a patron attribute, searchable, with an authorized value category, ie
LANG
5) Edit patron A to set a value in this attribute
6) Go to Circulation > Overdues
7) Select attribute value and apply filter
8) Check you see the patron A
9) Redo test plan with a patron attribute, searchable, without an authorized
value category

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

Fridolin Somers  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff
   Patch complexity|--- |Trivial patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

--- Comment #1 from Fridolin Somers  ---
This looks like very-old-buggy-code ^^

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30735] Filtering by patron attribute with AV does not work in overdues report

2022-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30735

Fridolin Somers  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|koha-b...@lists.koha-commun |fridolin.som...@biblibre.co
   |ity.org |m

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/