[Bug 20469] New: Add item status to staff article requests form

classic Classic list List threaded Threaded
36 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] New: Add item status to staff article requests form

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

            Bug ID: 20469
           Summary: Add item status to staff article requests form
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Circulation
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email], [hidden email]

The Article Requests feature does not look at item status. When you want to
process a request, it is useful to show a few fundamental item statuses like
Checked out, On hold or Available.

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |20468


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20468
[Bug 20468] Multiselect on staff article requests form
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |Needs Signoff
   Patch complexity|---                         |Trivial patch

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #1 from Marcel de Rooy <[hidden email]> ---
Created attachment 73281
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73281&action=edit
Bug 20469: Add item status to staff article request form

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |[hidden email]
                   |ity.org                     |
   Patch complexity|Trivial patch               |Small patch

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #73281|0                           |1
        is obsolete|                            |

--- Comment #2 from Marcel de Rooy <[hidden email]> ---
Created attachment 73282
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73282&action=edit
Bug 20469: Add item status to staff article request form

A method Koha::Item->is_waiting_or_transit is added (with tests).
The template checks if an item is checked out, on hold (waiting or
transit), or is available. (Note: This can be extended in the future
in a general include as we have at opac side.)

Test plan:
[1] Run t/db_dependent/Koha/Items.t
[2] Place an article request on an item on loan. Verify status on form.
[3] Place an article request on a waiting item. Check status again.

Signed-off-by: Marcel de Rooy <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #3 from M. Tompsett <[hidden email]> ---
Comment on attachment 73282
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73282
Bug 20469: Add item status to staff article request form

Review of attachment 73282:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20469&attachment=73282)
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt
@@ +42,5 @@
>  [% END %]
> +[% BLOCK item_status %][%# pass Koha::Item into myitem %]
> +    [% IF myitem.onloan %]Checked out
> +    [% ELSIF myitem.is_waiting_or_transit %]On hold
> +    [% ELSE %]Available

Just curious about the lack of <span>'s. Does this translate?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #4 from Marcel de Rooy <[hidden email]> ---
(In reply to M. Tompsett from comment #3)

> Comment on attachment 73282 [details] [review]
> Bug 20469: Add item status to staff article request form
>
> Review of attachment 73282 [details] [review]:
> -----------------------------------------------------------------
>
> ::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt
> @@ +42,5 @@
> >  [% END %]
> > +[% BLOCK item_status %][%# pass Koha::Item into myitem %]
> > +    [% IF myitem.onloan %]Checked out
> > +    [% ELSIF myitem.is_waiting_or_transit %]On hold
> > +    [% ELSE %]Available
>
> Just curious about the lack of <span>'s. Does this translate?

Hmm It doesnt. Will add a follow-up. Need them too in the other block. Thx.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #5 from Marcel de Rooy <[hidden email]> ---
Created attachment 73388
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73388&action=edit
Bug 20469: (Follow-up) Make translation of status possible

As Mark noticed, adding a span for each status will allow for translation.
Note that the menu options in the block before are inside html tags like
<a><i>..</i>..</a> and will be translated (as long as spaces match).

Signed-off-by: Marcel de Rooy <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #73282|0                           |1
        is obsolete|                            |

--- Comment #6 from Marcel de Rooy <[hidden email]> ---
Created attachment 76627
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76627&action=edit
Bug 20469: Add item status to staff article request form

A method Koha::Item->is_waiting_or_transit is added (with tests).
The template checks if an item is checked out, on hold (waiting or
transit), or is available. (Note: This can be extended in the future
in a general include as we have at opac side.)

Test plan:
[1] Run t/db_dependent/Koha/Items.t
[2] Place an article request on an item on loan. Verify status on form.
[3] Place an article request on a waiting item. Check status again.

Signed-off-by: Marcel de Rooy <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #73388|0                           |1
        is obsolete|                            |

--- Comment #7 from Marcel de Rooy <[hidden email]> ---
Created attachment 76628
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76628&action=edit
Bug 20469: (Follow-up) Make translation of status possible

As Mark noticed, adding a span for each status will allow for translation.
Note that the menu options in the block before are inside html tags like
<a><i>..</i>..</a> and will be translated (as long as spaces match).

Signed-off-by: Marcel de Rooy <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Owen Leonard <[hidden email]> 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
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #76627|0                           |1
        is obsolete|                            |
  Attachment #76628|0                           |1
        is obsolete|                            |

--- Comment #8 from Owen Leonard <[hidden email]> ---
Created attachment 76630
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76630&action=edit
Bug 20469: Add item status to staff article request form

A method Koha::Item->is_waiting_or_transit is added (with tests).
The template checks if an item is checked out, on hold (waiting or
transit), or is available. (Note: This can be extended in the future
in a general include as we have at opac side.)

Test plan:
[1] Run t/db_dependent/Koha/Items.t
[2] Place an article request on an item on loan. Verify status on form.
[3] Place an article request on a waiting item. Check status again.

Signed-off-by: Marcel de Rooy <[hidden email]>

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #9 from Owen Leonard <[hidden email]> ---
Created attachment 76631
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76631&action=edit
Bug 20469: (Follow-up) Make translation of status possible

As Mark noticed, adding a span for each status will allow for translation.
Note that the menu options in the block before are inside html tags like
<a><i>..</i>..</a> and will be translated (as long as spaces match).

Signed-off-by: Marcel de Rooy <[hidden email]>

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--- Comment #10 from Jonathan Druart <[hidden email]> ---
Why do you return an empty string instead of "0"?
IMO we should return ->count, and use the DBIC rs.

I will provide a patch and you will tell me what you think about it.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #76630|0                           |1
        is obsolete|                            |
  Attachment #76631|0                           |1
        is obsolete|                            |

--- Comment #11 from Jonathan Druart <[hidden email]> ---
Created attachment 77184
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77184&action=edit
Bug 20469: Add item status to staff article request form

A method Koha::Item->is_waiting_or_transit is added (with tests).
The template checks if an item is checked out, on hold (waiting or
transit), or is available. (Note: This can be extended in the future
in a general include as we have at opac side.)

Test plan:
[1] Run t/db_dependent/Koha/Items.t
[2] Place an article request on an item on loan. Verify status on form.
[3] Place an article request on a waiting item. Check status again.

Signed-off-by: Marcel de Rooy <[hidden email]>

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #12 from Jonathan Druart <[hidden email]> ---
Created attachment 77185
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77185&action=edit
Bug 20469: (Follow-up) Make translation of status possible

As Mark noticed, adding a span for each status will allow for translation.
Note that the menu options in the block before are inside html tags like
<a><i>..</i>..</a> and will be translated (as long as spaces match).

Signed-off-by: Marcel de Rooy <[hidden email]>

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #13 from Jonathan Druart <[hidden email]> ---
Created attachment 77186
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77186&action=edit
Bug 20469: Use DBIC rs and return ->count

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |NeedsMoreQA

--- Comment #14 from Jonathan Druart <[hidden email]> ---
Koha::Item->is_waiting_or_transit sounds wrong to me, this logic belongs to
Koha::Hold
Waiting for another QA opinion.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #15 from Marcel de Rooy <[hidden email]> ---
(In reply to Jonathan Druart from comment #10)
> Why do you return an empty string instead of "0"?
> IMO we should return ->count, and use the DBIC rs.
>
> I will provide a patch and you will tell me what you think about it.

Empty string is the perl default for false. I have seen its use more in the
Koha codebase. But I have no objection to your follow-up. Thanks.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |BLOCKED

--- Comment #16 from Marcel de Rooy <[hidden email]> ---
(In reply to Jonathan Druart from comment #14)
> Koha::Item->is_waiting_or_transit sounds wrong to me, this logic belongs to
> Koha::Hold
> Waiting for another QA opinion.

Yeah, I could agree too. Having another look..

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|NeedsMoreQA                 |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #17 from Marcel de Rooy <[hidden email]> ---
Created attachment 77222
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77222&action=edit
Bug 20469: (follow-up) Add Koha::Holds->waiting_or_transit

Adding this variant next to existing ->waiting and ->unfilled methods.
The method will be used in the next patch in Koha::Item.
Trivial unit test added in Holds.t

Test plan:
Run t/db_dependent/Holds.t

Signed-off-by: Marcel de Rooy <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77184|0                           |1
        is obsolete|                            |

--- Comment #18 from Marcel de Rooy <[hidden email]> ---
Created attachment 77223
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77223&action=edit
Bug 20469: Add item status to staff article request form

A method Koha::Item->has_waiting_or_transit_hold is added (with tests).
The template checks if an item is checked out, on hold (waiting or
transit), or is available. (Note: This can be extended in the future
in a general include as we have at opac side.)

Test plan:
[1] Run t/db_dependent/Koha/Items.t
[2] Place an article request on an item on loan. Verify status on form.
[3] Place an article request on a waiting item. Check status again.

Signed-off-by: Marcel de Rooy <[hidden email]>

Signed-off-by: Owen Leonard <[hidden email]>

EDIT (July 24, 2018):
Method renamed to has_waiting_or_transit_hold. Part of the logic moved to
Koha::Holds (see first patch now). Replaced storing undef to found by
deleting hold in corresponding subtest of Items.t.
Added an additional check in the template for article requests on record
level that have no itemnumber (in that case no item status).

Signed-off-by: Marcel de Rooy <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #19 from Marcel de Rooy <[hidden email]> ---
Created attachment 77224
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77224&action=edit
Bug 20469: (follow-up) Make translation of status possible

As Mark noticed, adding a span for each status will allow for translation.
Note that the menu options in the block before are inside html tags like
<a><i>..</i>..</a> and will be translated (as long as spaces match).

Signed-off-by: Marcel de Rooy <[hidden email]>

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #20 from Marcel de Rooy <[hidden email]> ---
Core change is now:
+sub has_waiting_or_transit_hold {
+    my ( $self ) = @_;
+    my $rs = $self->_result->reserves;
+    return Koha::Holds->_new_from_dbic($rs)->waiting_or_transit->count;
+}

But I am still not completely happy about it. Fetching a result set, wrapping
it in Koha object and searching again..

Another approach would be to get the "found => [W, T] " attribute from a class
method in Koha Holds and pass it into the DBIx call in Koha Item. Resulting in
one search. But also not very nice..

Or add something like Koha::Holds->search_waiting_or_transit({ itemnumber => $x
})->count..

What do you think?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #21 from Marcel de Rooy <[hidden email]> ---
Other candidates for a future change?

C4/Items.pm:            WHERE (found = 'W' OR found = 'T')
C4/Members.pm:    my $waiting_holds = $patron->holds->search({ found => 'W' });
circ/returns.pl:            my $waiting_holds = $patron->holds->search({ found
=> 'W', branchcode => $userenv_branch })->count;
installer/data/mysql/updatedatabase.pl:    my $waiting_holds =
Koha::Holds->search({ found => 'W', priority => 0 });

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77184|1                           |0
        is obsolete|                            |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin.renvoize@ptfs-europe
                   |                            |.com

--- Comment #22 from Jonathan Druart <[hidden email]> ---
The "correct" way to do it (regarding the discussion on bug 11983) would be:

  $patron->holds->filter_by_in_transit->filter_by_waiting

But it is not as simple to implement as it sounds.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20469] Add item status to staff article requests form

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20469

--- Comment #23 from Marcel de Rooy <[hidden email]> ---
(In reply to Jonathan Druart from comment #22)
> The "correct" way to do it (regarding the discussion on bug 11983) would be:
>
>   $patron->holds->filter_by_in_transit->filter_by_waiting
>
> But it is not as simple to implement as it sounds.

Yeah, this sounds more like transit AND waiting instead of transit OR waiting.
And the idea of two filters applied in a row does not look good in terms of
performance.

I will leave this patch in BLOCKED for the time being.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
12