[Koha-bugs] [Bug 18361] Koha::Objects->find should accept composite primary keys

2017-08-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #35 from Katrin Fischer  ---
Thx Marcel - patches apply now and tests pass.

This patch has been pushed to 16.11.x and will be in 16.11.11.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #34 from Marcel de Rooy  ---
(In reply to Katrin Fischer from comment #32)
> Conflicts with 16.11.x. If you want this to be included, please rebase on
> 16.11.x. Thx!

That you should do it..

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #33 from Marcel de Rooy  ---
Created attachment 66006
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66006=edit
Bug 18361: [SQUASHED FOR 16.11] Koha::Objects->find should accept composite
primary keys

Changes the $id parameter to an array. (IssuingRule has three keys.)
The build_object method in TestBuilder.pm has been adjusted to pass
multiple primary key values to find.

Also adjusted the POD section to show more clearly that we accept
the same parameters as DBIx ResultSet does.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/TestBuilder.t

Signed-off-by: Marcel de Rooy 
Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

Bug 18361: Additional tests for Koha::Objects->find

Adding a subtest find in t/db_dependent/Koha/Objects.t.

Test plan:
Run t/db_dependent/Koha/Objects.t

Signed-off-by: Marcel de Rooy 
Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

Bug 18361: (QA followup) Add tests for the no params case

This patch adds a test for the trivial case in which no param is passed
and the ->find method returns undef.

For completeness purposes.

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

Bug 18361: [QA Follow-up] Resolve warning on undef values supplied

The following warning was raised in Letters.t:
DBIx::Class::ResultSource::_minimal_valueset_satisfying_constraint():
NULL/undef values supplied for requested unique constraint 'primary' (NULL
values in column(s): 'id'). This is almost certainly not what you wanted,
though you can set DBIC_NULLABLE_KEY_NOWARN to disable this warning.

This warning is triggered by this line in C4/Letters.pm:
Koha::SMS::Providers->find( $member->{'sms_provider_id'} );
As you already guessed, the sms_provider_id returns undef.

Resolved in sub find by testing if there are parameters and if so, they
should not be all undefined. (In most cases there will be only one
parameter; but this report is about composite keys.)

Added a trivial test case in Objects.t too.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/Letters.t

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Katrin Fischer  changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de

--- Comment #32 from Katrin Fischer  ---
Conflicts with 16.11.x. If you want this to be included, please rebase on
16.11.x. Thx!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-08-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #31 from Fridolin SOMERS  ---
I finally to push to 17.05.x in order to follow master using this change.

Will be in 17.05.03.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-08-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Fridolin SOMERS  changed:

   What|Removed |Added

 Blocks||18951


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18951
[Bug 18951] Some t/Biblio tests are database dependent
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Fridolin SOMERS  changed:

   What|Removed |Added

 CC||fridolin.som...@biblibre.co
   ||m
 Resolution|--- |FIXED
 Status|Pushed to Master|RESOLVED

--- Comment #30 from Fridolin SOMERS  ---
Enhancement not pushed to 17.05.x

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361
Bug 18361 depends on bug 18539, which changed state.

Bug 18539 Summary: Forbid Koha::Objects->find calls in list context
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18539

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master

--- Comment #29 from Jonathan Druart  
---
Pushed to master for 17.11, 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
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #28 from Marcel de Rooy  ---
Created attachment 64372
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64372=edit
Bug 18361: [QA Follow-up] Resolve warning on undef values supplied

The following warning was raised in Letters.t:
DBIx::Class::ResultSource::_minimal_valueset_satisfying_constraint():
NULL/undef values supplied for requested unique constraint 'primary' (NULL
values in column(s): 'id'). This is almost certainly not what you wanted,
though you can set DBIC_NULLABLE_KEY_NOWARN to disable this warning.

This warning is triggered by this line in C4/Letters.pm:
Koha::SMS::Providers->find( $member->{'sms_provider_id'} );
As you already guessed, the sms_provider_id returns undef.

Resolved in sub find by testing if there are parameters and if so, they
should not be all undefined. (In most cases there will be only one
parameter; but this report is about composite keys.)

Added a trivial test case in Objects.t too.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/Letters.t

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Failed QA   |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #27 from Marcel de Rooy  ---
(In reply to Jonathan Druart from comment #26)
> I get warnings from tests:
> 
> t/db_dependent/Letters.t . 3/82
> DBIx::Class::ResultSource::_minimal_valueset_satisfying_constraint():
> NULL/undef values supplied for requested unique constraint 'primary' (NULL
> values in column(s): 'id'). This is almost certainly not what you wanted,
> though you can set DBIC_NULLABLE_KEY_NOWARN to disable this warning. at
> /home/vagrant/kohaclone/Koha/Objects.pm line 91

Good catch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #26 from Jonathan Druart  
---
I get warnings from tests:

t/db_dependent/Letters.t . 3/82
DBIx::Class::ResultSource::_minimal_valueset_satisfying_constraint():
NULL/undef values supplied for requested unique constraint 'primary' (NULL
values in column(s): 'id'). This is almost certainly not what you wanted,
though you can set DBIC_NULLABLE_KEY_NOWARN to disable this warning. at
/home/vagrant/kohaclone/Koha/Objects.pm line 91

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Jonathan Druart  changed:

   What|Removed |Added

 Depends on||18539

--- Comment #25 from Jonathan Druart  
---
Patches rebased on top of bug 18539


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18539
[Bug 18539] Forbid Koha::Objects->find calls in list context
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA
  Attachment #62909|0   |1
is obsolete||
  Attachment #62910|0   |1
is obsolete||
  Attachment #62911|0   |1
is obsolete||
  Attachment #64339|0   |1
is obsolete||
  Attachment #64340|0   |1
is obsolete||
  Attachment #64341|0   |1
is obsolete||

--- Comment #19 from Jonathan Druart  
---
Created attachment 64339
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64339=edit
Bug 18361: Koha::Objects->find should accept composite primary keys

Changes the $id parameter to an array. (IssuingRule has three keys.)
The build_object method in TestBuilder.pm has been adjusted to pass
multiple primary key values to find.

Also adjusted the POD section to show more clearly that we accept
the same parameters as DBIx ResultSet does.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/TestBuilder.t

Signed-off-by: Marcel de Rooy 
Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

--- Comment #20 from Jonathan Druart  
---
Created attachment 64340
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64340=edit
Bug 18361: Additional tests for Koha::Objects->find

Adding a subtest find in t/db_dependent/Koha/Objects.t.

Test plan:
Run t/db_dependent/Koha/Objects.t

Signed-off-by: Marcel de Rooy 
Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

--- Comment #21 from Jonathan Druart  
---
Created attachment 64341
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64341=edit
Bug 18361: (QA followup) Add tests for the no params case

This patch adds a test for the trivial case in which no param is passed
and the ->find method returns undef.

For completeness purposes.

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

--- Comment #22 from Jonathan Druart  
---
Created attachment 64347
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64347=edit
Bug 18361: Koha::Objects->find should accept composite primary keys

Changes the $id parameter to an array. (IssuingRule has three keys.)
The build_object method in TestBuilder.pm has been adjusted to pass
multiple primary key values to find.

Also adjusted the POD section to show more clearly that we accept
the same parameters as DBIx ResultSet does.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/TestBuilder.t

Signed-off-by: Marcel de Rooy 
Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #24 from Jonathan Druart  
---
Created attachment 64349
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64349=edit
Bug 18361: (QA followup) Add tests for the no params case

This patch adds a test for the trivial case in which no param is passed
and the ->find method returns undef.

For completeness purposes.

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #23 from Jonathan Druart  
---
Created attachment 64348
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64348=edit
Bug 18361: Additional tests for Koha::Objects->find

Adding a subtest find in t/db_dependent/Koha/Objects.t.

Test plan:
Run t/db_dependent/Koha/Objects.t

Signed-off-by: Marcel de Rooy 
Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-06-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #18 from Marcel de Rooy  ---
ping Jonathan

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-05-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Signed Off

--- Comment #17 from Marcel de Rooy  ---
Jonathan: Please try again. I actually did not change anything.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-05-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #62397|0   |1
is obsolete||

--- Comment #16 from Marcel de Rooy  ---
Created attachment 62911
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62911=edit
Bug 18361: (QA followup) Add tests for the no params case

This patch adds a test for the trivial case in which no param is passed
and the ->find method returns undef.

For completeness purposes.

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-05-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #62395|0   |1
is obsolete||

--- Comment #14 from Marcel de Rooy  ---
Created attachment 62909
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62909=edit
Bug 18361: Koha::Objects->find should accept composite primary keys

Changes the $id parameter to an array. (IssuingRule has three keys.)
The build_object method in TestBuilder.pm has been adjusted to pass
multiple primary key values to find.

Also adjusted the POD section to show more clearly that we accept
the same parameters as DBIx ResultSet does.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/TestBuilder.t

Signed-off-by: Marcel de Rooy 
Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-05-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #62396|0   |1
is obsolete||

--- Comment #15 from Marcel de Rooy  ---
Created attachment 62910
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62910=edit
Bug 18361: Additional tests for Koha::Objects->find

Adding a subtest find in t/db_dependent/Koha/Objects.t.

Test plan:
Run t/db_dependent/Koha/Objects.t

Signed-off-by: Marcel de Rooy 
Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Patch doesn't apply

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361
Bug 18361 depends on bug 18182, which changed state.

Bug 18182 Summary: TestBuilder should be able to return Koha::Object objects
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18182

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #13 from Marcel de Rooy  ---
(In reply to Tomás Cohen Arazi from comment #12)
> Signed-off-by: Tomas Cohen Arazi 

Thx

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Tomás Cohen Arazi  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
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #12 from Tomás Cohen Arazi  ---
Created attachment 62397
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62397=edit
Bug 18361: (QA followup) Add tests for the no params case

This patch adds a test for the trivial case in which no param is passed
and the ->find method returns undef.

For completeness purposes.

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #62143|0   |1
is obsolete||

--- Comment #11 from Tomás Cohen Arazi  ---
Created attachment 62396
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62396=edit
Bug 18361: Additional tests for Koha::Objects->find

Adding a subtest find in t/db_dependent/Koha/Objects.t.

Test plan:
Run t/db_dependent/Koha/Objects.t

Signed-off-by: Marcel de Rooy 
Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #8 from Marcel de Rooy  ---
Tomas: I adjusted the POD to make your concerns more visible, and renamed the
@id array to a more generic name @pars, since it indeed may contain an attrs
hash.
Additionally, I added a find subtest in Objects.t that contains a few tests
where an attr hash is passed along to find.
Signoff time :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #9 from Marcel de Rooy  ---
(In reply to Jonathan Druart from comment #3)
> (In reply to Marcel de Rooy from comment #2)
> > The indirect way of testing the changed find via TestBuilder works.
> > Is it enough or should we add find tests in Koha/Objects.t?
> > Note that I perhaps would have expected such a subtest already, but it does
> > not exist ;)
> 
> Yes we should definitely have one in Objects.t

Done

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #61754|0   |1
is obsolete||

--- Comment #6 from Marcel de Rooy  ---
Created attachment 62142
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62142=edit
Bug 18361: Koha::Objects->find should accept composite primary keys

Changes the $id parameter to an array. (IssuingRule has three keys.)
The build_object method in TestBuilder.pm has been adjusted to pass
multiple primary key values to find.

Also adjusted the POD section to show more clearly that we accept
the same parameters as DBIx ResultSet does.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/TestBuilder.t

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #7 from Marcel de Rooy  ---
Created attachment 62143
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62143=edit
Bug 18361: Additional tests for Koha::Objects->find

Adding a subtest find in t/db_dependent/Koha/Objects.t.

Test plan:
Run t/db_dependent/Koha/Objects.t

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=18427

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #5 from Marcel de Rooy  ---
(In reply to Tomás Cohen Arazi from comment #4)
> Comment on attachment 61754 [details] [review]
> Bug 18361: Koha::Objects->find should accept composite primary keys
> 
> > sub find {
> >-my ( $self, $id ) = @_;
> >+my ( $self, @id ) = @_;
> 
> While I agree with the general idea, I'd prefer that we keep in mind that
> this is a passthrough to DBIC ->find method. In that sense, please look at
> ResultSet.pm:
> 
> sub find {
>   my $self = shift;
>   my $attrs = (@_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {});
> 
> IMHO we should implement exactly that, probably accept whatever is passed to
> K:O->find and just pass it to RS->find.

my $result = $self->_resultset()->find(@id);

So we pass them to RS. What is exactly your point ?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-04-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #4 from Tomás Cohen Arazi  ---
Comment on attachment 61754
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61754
Bug 18361: Koha::Objects->find should accept composite primary keys

> sub find {
>-my ( $self, $id ) = @_;
>+my ( $self, @id ) = @_;

While I agree with the general idea, I'd prefer that we keep in mind that this
is a passthrough to DBIC ->find method. In that sense, please look at
ResultSet.pm:

sub find {
  my $self = shift;
  my $attrs = (@_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {});

IMHO we should implement exactly that, probably accept whatever is passed to
K:O->find and just pass it to RS->find.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #3 from Jonathan Druart  
---
(In reply to Marcel de Rooy from comment #2)
> The indirect way of testing the changed find via TestBuilder works.
> Is it enough or should we add find tests in Koha/Objects.t?
> Note that I perhaps would have expected such a subtest already, but it does
> not exist ;)

Yes we should definitely have one in Objects.t

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

   Assignee|gmcha...@gmail.com  |m.de.r...@rijksmuseum.nl
 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org,
   ||tomasco...@gmail.com

--- Comment #2 from Marcel de Rooy  ---
The indirect way of testing the changed find via TestBuilder works.
Is it enough or should we add find tests in Koha/Objects.t?
Note that I perhaps would have expected such a subtest already, but it does not
exist ;)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

--- Comment #1 from Marcel de Rooy  ---
Created attachment 61754
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61754=edit
Bug 18361: Koha::Objects->find should accept composite primary keys

Changes the $id parameter to an array. (IssuingRule has three keys.)
The build_object method in TestBuilder.pm has been adjusted to pass
multiple primary key values to find.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/TestBuilder.t

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 18361] Koha::Objects->find should accept composite primary keys

2017-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361

Marcel de Rooy  changed:

   What|Removed |Added

 Depends on||18182
   Patch complexity|--- |Small patch


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18182
[Bug 18182] TestBuilder should be able to return Koha::Object objects
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/