Bug 41082: Fix batch tools from reports when itemnumber col has been renamed

Description from comment 0

When creating an SQL report and it contains the column itemnumber, we
activate batch operations above the table. The itemnumber column can be
renamed, using the syntax [[itemnumber|Exemplarnummer]], which gives us
the option to translate the column name into something nicer for
display.

But: if you then send to batch item edit, the items are not
transmitted.

Test plan:

1) Create a report:
   select itemnumber, itemcallnumber from items;

2) Send some items to batch item edit, verify the items are shown above
   the item form

3) Update the report:
   select [[itemnumber|Exemplarnummer]], itemcallnumber from items;

4) Verify the report still shows as before with the batch options
   available and only the column being renamed.

5) Send some items to the batch item edit again

   => verify the items are shown above the item form

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-10-24 16:25:44 +00:00 committed by Lucas Gass
parent a95f5ea73a
commit 26d740f267
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 2 additions and 2 deletions

View File

@ -1001,7 +1001,7 @@
[% IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber' %]
[% SET batch_itemnumbers = 1 %]
[% SET header_row.$place.has_itemnumbers = 1 %]
<input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
<input type="hidden" name="itemnumber" value="[% cells.cell | html %]" />
[% END %]
[% END %]
[% END %]
@ -1018,7 +1018,7 @@
[% IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber' %]
[% SET batch_itemnumbers = 1 %]
[% SET header_row.$place.has_itemnumbers = 1 %]
<input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
<input type="hidden" name="itemnumber" value="[% cells.cell | html %]" />
[% END %]
[% END %]
[% END %]