https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
See Also|
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
David Cook changed:
What|Removed |Added
CC||dc...@prosentient.com.au
--
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
Status|In Discussion |RESOLVED
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
See Also|
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #55 from Marcel de Rooy ---
Just failed another bug because this does not work (TT list context):
[% IF patron.article_requests_current.count %]
And about that, I have been saying longer that I just dont like all these
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #54 from Jonathan Druart ---
Just saying, I though we were all aware of these problems. I have been all down
this road long time ago and it's why I introduced the use of scalar and the
weird lines in the include file
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #53 from Martin Renvoize ---
Humm.. now I'm more confused.. the TT docs mention the Scalar plugin but that
perlmonks question mentioned ::Stash::Context.. I'm not sure which route we're
talking about now.
--
You are
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #52 from Martin Renvoize ---
Hmm, for the .scalar stuff to work do we not need to also update C4::Templates
to use the "experimental" Template::Stash::Context module for it's stash as
aposed to the default
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #51 from Marcel de Rooy ---
Comment on attachment 124420
--> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124420
Bug 28883: (QA follow-up) Update use of Scalar
I think we better remove this patch here.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #50 from Marcel de Rooy ---
(In reply to Tomás Cohen Arazi from comment #48)
> We should be able to use the TT scalar plugin and do things like:
>
> [% USE scalar %]
> [% SET var = scalar.biblio.items %]
>
> but I
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #49 from Marcel de Rooy ---
(In reply to Marcel de Rooy from comment #47)
> But it fails. TT calls the orders method in LIST context. Explaining the
> horrible scalar stuff introduced.
> See also
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #48 from Tomás Cohen Arazi ---
(In reply to Marcel de Rooy from comment #47)
> (In reply to Marcel de Rooy from comment #45)
> > git grep Context.Scalar on master
> >
> >
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #47 from Marcel de Rooy ---
(In reply to Marcel de Rooy from comment #45)
> git grep Context.Scalar on master
>
> koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc:[% IF
> Context.Scalar(Context.Scalar(items,
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #46 from Marcel de Rooy ---
(In reply to Tomás Cohen Arazi from comment #33)
> After reading the comments again, it seems that:
> - Keep wantarray, fix places: ashimema, tcohen
> - Get rid of wantarray: Joubu
>
> what
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #45 from Marcel de Rooy ---
git grep Context.Scalar on master
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc:[% IF
Context.Scalar(Context.Scalar(items, "filter_by_for_hold"), "count") %]
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #44 from Marcel de Rooy ---
OK Cant find bad calls that easy ;) WHich doesnt say there are none!
What I did:
=== cd Koha; git grep -E "return.*s\->_new_from_dbic"
=> Find routines that directly return a new_from_dbic
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #43 from Marcel de Rooy ---
(In reply to Marcel de Rooy from comment #41)
> (In reply to Jonathan Druart from comment #20)
> > I have found only one problematic occurrence but I'd like another QA stamp
> > with that in
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #42 from Marcel de Rooy ---
$biblio->items->filter_by_visible_in_opac( { patron => $patron } )->as_list
=> This filter sub in Koha/Items always returns a scalar (a plural object).
=> Unfortunately, we have been quite
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #41 from Marcel de Rooy ---
(In reply to Jonathan Druart from comment #20)
> I have found only one problematic occurrence but I'd like another QA stamp
> with that in mind.
I have my doubts here if that was really the
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #40 from Marcel de Rooy ---
[PATCH 4/5] Bug 28883: Fix wrong list context calls
-my $images = $biblio->cover_images;
-$template->param( localimages => $biblio->cover_images );
+$template->param( localimages
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #39 from Marcel de Rooy ---
(In reply to Tomás Cohen Arazi from comment #16)
> (In reply to Jonathan Druart from comment #15)
> > Wow, no! This is not as trivial as it looks like.
> >
> > We must force scalar context
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #38 from Marcel de Rooy ---
(In reply to Jonathan Druart from comment #22)
> If we need consistency, then should we adjust all the other methods?
>
> Koha::UploadedFiles->getCategories?
Whats wrong with that one?
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #37 from Marcel de Rooy ---
Curious code segment Koha/Patron:
sub get_club_enrollments {
my ( $self, $return_scalar ) = @_;
my $e = Koha::Club::Enrollments->search( { borrowernumber =>
$self->borrowernumber(),
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #36 from Marcel de Rooy ---
+is( $items_scalar->count, 2, 'No items in resultset' );
+is( scalar @items_list, 2, 'Empty list in list context' );
--
You are receiving this mail because:
You are watching all bug
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #35 from Marcel de Rooy ---
Looking here now.
--
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #34 from Marcel de Rooy ---
(In reply to Tomás Cohen Arazi from comment #33)
> After reading the comments again, it seems that:
> - Keep wantarray, fix places: ashimema, tcohen
> - Get rid of wantarray: Joubu
>
> what
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #33 from Tomás Cohen Arazi ---
After reading the comments again, it seems that:
- Keep wantarray, fix places: ashimema, tcohen
- Get rid of wantarray: Joubu
what do you think, Marcel?
--
You are receiving this mail
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #32 from Tomás Cohen Arazi ---
@ashimema, @Joubu what you think needs to be done to unlock this?
I could chase the places in which scalar is used in a chained fashion on
templates and make them use the Scalar TT plugin
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #31 from Martin Renvoize ---
After playing with this in a few ways I think I like the plan of doing as dbic
does with the standard returns.. i.e. using wantarray and taking note of
context.
I don't hugely like the use
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
Blocks|24857 |
Referenced Bugs:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
Status|Failed QA |In Discussion
---
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #29 from Jonathan Druart ---
It's not something we can/should do in one patch (either way we pick).
But we can start moving some, bit by bit, and add a deprecation notice (like:
we won't support wantarray in 2 major
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Martin Renvoize changed:
What|Removed |Added
Status|Signed Off |Failed QA
--- Comment
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Martin Renvoize changed:
What|Removed |Added
Status|Failed QA |Signed Off
--- Comment
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #26 from Martin Renvoize ---
Created attachment 124420
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124420=edit
Bug 28883: (QA follow-up) Update use of Scalar
This patch updates the use of the TT
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Martin Renvoize changed:
What|Removed |Added
Status|Signed Off |Failed QA
--- Comment
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #24 from Tomás Cohen Arazi ---
(In reply to Martin Renvoize from comment #23)
> (In reply to Jonathan Druart from comment #21)
> > (In reply to Tomás Cohen Arazi from comment #19)
> > > $template->param(
> > >
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #23 from Martin Renvoize ---
(In reply to Jonathan Druart from comment #21)
> (In reply to Tomás Cohen Arazi from comment #19)
> > $template->param(
> > outstanding_debits => scalar
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #22 from Jonathan Druart ---
If we need consistency, then should we adjust all the other methods?
Koha::UploadedFiles->getCategories?
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #21 from Jonathan Druart ---
(In reply to Tomás Cohen Arazi from comment #19)
> $template->param(
> outstanding_debits => scalar $patron->account->outstanding_debits,
> items => scalar
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Jonathan Druart changed:
What|Removed |Added
Status|Failed QA |Signed Off
--- Comment
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #19 from Tomás Cohen Arazi ---
I get it, but consistency will always be a good thing!
Right now we need:
$template->param(
outstanding_debits => scalar $patron->account->outstanding_debits,
items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #18 from Jonathan Druart ---
Created attachment 124181
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124181=edit
Bug 28883: Fix wrong list context calls
--
You are receiving this mail because:
You
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #17 from Jonathan Druart ---
I don't know, did you check the hundreds occurrences we have in the code?
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #16 from Tomás Cohen Arazi ---
(In reply to Jonathan Druart from comment #15)
> Wow, no! This is not as trivial as it looks like.
>
> We must force scalar context actually. I am expecting lot of side-effects
> with this
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Jonathan Druart changed:
What|Removed |Added
Status|Passed QA |Failed QA
--- Comment
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
See Also|
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #14 from Tomás Cohen Arazi ---
(In reply to Marcel de Rooy from comment #13)
> (In reply to Marcel de Rooy from comment #7)
> > Seems to work as it is, but I am just wondering if we should force scalar
> > context within
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
Blocks||24857
Referenced
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Marcel de Rooy changed:
What|Removed |Added
Status|BLOCKED |Passed QA
--
You are
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Marcel de Rooy changed:
What|Removed |Added
Attachment #123995|0 |1
is obsolete|
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #13 from Marcel de Rooy ---
(In reply to Marcel de Rooy from comment #7)
> Seems to work as it is, but I am just wondering if we should force scalar
> context within the map statement of _wrap ?
This is nonsense. We are
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Marcel de Rooy changed:
What|Removed |Added
Status|Passed QA |BLOCKED
--- Comment #12
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #11 from Marcel de Rooy ---
Created attachment 123995
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123995=edit
Bug 28883: [OPTIONAL] (follow-up) Should we force scalar context within map?
Currently,
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #10 from Marcel de Rooy ---
Created attachment 123994
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123994=edit
Bug 28883: (QA follow-up) Improve test description
Copy-pasted descriptions.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Marcel de Rooy changed:
What|Removed |Added
Attachment #123981|0 |1
is obsolete|
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Marcel de Rooy changed:
What|Removed |Added
Attachment #123980|0 |1
is obsolete|
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Marcel de Rooy changed:
What|Removed |Added
Patch complexity|--- |Small patch
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #7 from Marcel de Rooy ---
Seems to work as it is, but I am just wondering if we should force scalar
context within the map statement of _wrap ?
To prevent perl one day (another version etc) guessing list context and
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #6 from Marcel de Rooy ---
is( $items_scalar->count, 2, 'No items in resultset' );
Hmm that description ;)
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Marcel de Rooy changed:
What|Removed |Added
CC||m.de.r...@rijksmuseum.nl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
David Nind changed:
What|Removed |Added
Attachment #123977|0 |1
is obsolete|
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
David Nind changed:
What|Removed |Added
Attachment #123976|0 |1
is obsolete|
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
David Nind changed:
What|Removed |Added
Status|Needs Signoff |Signed Off
--
You are
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
Blocks||28886
Referenced
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
CC|
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #2 from Tomás Cohen Arazi ---
Created attachment 123977
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123977=edit
Bug 28883: Make Koha::Objects->_new_from_dbic honour list context
This patch makes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #1 from Tomás Cohen Arazi ---
Created attachment 123976
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123976=edit
Bug 28883: Regression tests
--
You are receiving this mail because:
You are watching
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
Severity|enhancement |normal
--
You are
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
Tomás Cohen Arazi changed:
What|Removed |Added
Status|NEW |ASSIGNED
70 matches
Mail list logo