[Koha-bugs] [Bug 28732] New: Order and claim emails don't work well with repeatable information

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 21 18:20:23 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28732

            Bug ID: 28732
           Summary: Order and claim emails don't work well with repeatable
                    information
 Change sponsored?: ---
           Product: Koha
           Version: 20.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Notices
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: katrin.fischer at bsz-bw.de
        QA Contact: testopia at bugs.koha-community.org

There is an issue with how the repeatable part of the notice is figured out.
This sets some strict limits to how you can write the notice template. It
appears that the repeat will happen from first to the last placeholder from an
acq table used in the notice. The <order> tags don't appear to be used at all.

Test plan: 
- Create a basket with more than one order line
- Set up a notice called ACQORDER for sending order emails (templats below)
- Make sure the vendor has an email set and all checkboxes in the contact are
checked
- Make sure your system can send emails
- Click button "send order e-mail" on the basket summary page


------------------------------------------------

ACQORDER TEMPLATE 1:

[%- USE Price -%]
Dear...<br>
<br>
<order><b>Title:</b> <<biblio.title>><br /><b>Author:</b> <<biblio.author>><br
/><b>Edition:</b> <<biblioitems.editionstatement>><br /><b>Year:</b>
<<biblio.copyrightdate>><br /><b>ISBN:</b> <<biblioitems.isbn>><br
/><b>Units:</b> <<aqorders.quantity>><br /><b>Price:</b> [%
<<aqorders.listprice>> | $Price %] EUR<br><br></order>

<br><br>
Thank you!


RESULT: Dear and Thank you only appear once. OK.

Dear...

Title: ...
Author: ...
Edition: 1. Auflage, Originalausgabe
Year: 
ISBN: 9783839225837
Units: 1
Price: 13.99 EUR 

Title: ...
Author: 
Edition: 
Year: 2020
ISBN: 
Units: 1
Price: 13.00 EUR 

Thank you! 


------------------------------------------------

ACQORDER TEMPLATE 2: Only addition/change is the second line.

[%- USE Price -%]
<h2>Order: <<aqbasket.basketname>></h2>
Dear...<br>
<br>
<order><b>Title:</b> <<biblio.title>><br /><b>Author:</b> <<biblio.author>><br
/><b>Edition:</b> <<biblioitems.editionstatement>><br /><b>Year:</b>
<<biblio.copyrightdate>><br /><b>ISBN:</b> <<biblioitems.isbn>><br
/><b>Units:</b> <<aqorders.quantity>><br /><b>Price:</b> [%
<<aqorders.listprice>> | $Price %] EUR<br><br></order>
</hr>

<br><br>
Thank you!


RESULT: Order:... and Dear... lines are repeated. For information from the
basket this doesn't make sense. If you add a field from the branches table,
this doesn't appear to cause any additional repeats.

Order: 28.4.2021
Dear...

Title: ...
Author: ...
Edition: 1. Auflage, Originalausgabe
Year: 
ISBN: 9783839225837
Units: 1
Price: 13.99 EUR 
Order: 28.4.2021
Dear...

Title: ...
Author: 
Edition: 
Year: 2020
ISBN: 
Units: 1
Price: 13.00 EUR 

Thank you!

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list