Bug 19233 - Add ability to send itemnumbers in report results to batch modification
Summary: Add ability to send itemnumbers in report results to batch modification
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Whiteboard:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2017-09-01 00:54 UTC by Nick Clemens
Modified: 2018-04-23 22:53 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19233 - Add ability to send itemnumbers in report results to batch modification (2.84 KB, patch)
2017-09-01 00:57 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19233 - Add ability to send itemnumbers in report results to batch modification (2.93 KB, patch)
2017-09-12 14:16 UTC, ByWaterSandboxes
Details | Diff | Splinter Review
Bug 19233: (follow-up) Send itemnumbers in report results to batch modification (3.74 KB, patch)
2017-09-18 15:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19233 - Add ability to send itemnumbers in report results to batch modification (3.00 KB, patch)
2017-10-07 18:43 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19233: (follow-up) Send itemnumbers in report results to batch modification (3.80 KB, patch)
2017-10-07 18:43 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19233 - Add ability to send itemnumbers in report results to batch modification (3.16 KB, patch)
2017-12-19 16:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19233: (follow-up) Send itemnumbers in report results to batch modification (3.80 KB, patch)
2017-12-19 16:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19233 - Add ability to send itemnumbers in report results to batch modification (3.22 KB, patch)
2018-03-09 12:34 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 19233: (follow-up) Send itemnumbers in report results to batch modification (3.88 KB, patch)
2018-03-09 12:34 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 19233: (follow-up) Don't use JS trickery to set form action (1.37 KB, patch)
2018-03-27 17:31 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19233: (follow-up) Use a button to submit form (2.89 KB, patch)
2018-03-27 17:48 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19233: (follow-up) Use a button to submit form (2.87 KB, patch)
2018-03-27 17:51 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19233: (follow-up) Use a button to submit form (2.87 KB, patch)
2018-03-27 17:52 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19233: Restore styling of the button (1.26 KB, patch)
2018-03-27 20:53 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-09-01 00:54:41 UTC

    
Comment 1 Nick Clemens 2017-09-01 00:57:29 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2017-09-01 06:29:20 UTC
Hm, will that only work if you name the column itemnumber?
Comment 3 ByWaterSandboxes 2017-09-12 14:16:18 UTC
Patch tested with a sandbox, by George <george@nekls.org>
Comment 4 ByWaterSandboxes 2017-09-12 14:16:33 UTC Comment hidden (obsolete)
Comment 5 Owen Leonard 2017-09-18 15:09:00 UTC
(In reply to Katrin Fischer from comment #2)
> Hm, will that only work if you name the column itemnumber?

My test indicates that this is the case. The column must be named "itemnumber."
Comment 6 Owen Leonard 2017-09-18 15:34:27 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2017-09-18 16:13:45 UTC
This is a bit of a translation issue, but I like the idea of this and can't come up with a way to avoid the problem right now. could we use a placeholder that would still allow a translated heading? "Exemplarnummer <<itemnumber>>"?
Comment 8 Katrin Fischer 2017-10-07 18:43:24 UTC
Created attachment 67805 [details] [review]
Bug 19233 - Add ability to send itemnumbers in report results to batch modification

To test:
1 - Apply patch
2 - Run a report with an itemnumber column
3 - Note there is a linked '^' after column title
4 - Hover over the '^'
5 - You should see a tooltip 'Send visible items to batch modification'
6 - Click the '^'
7 - You should be sent to batch item modification with itemnumbers that
were visible in report

Signed-off-by: George <george@nekls.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2017-10-07 18:43:27 UTC Comment hidden (obsolete)
Comment 10 Katrin Fischer 2017-10-07 18:44:04 UTC
It's a neat little feature, even with the translation issue.
Comment 11 Owen Leonard 2017-12-19 16:16:43 UTC
Created attachment 69920 [details] [review]
Bug 19233 - Add ability to send itemnumbers in report results to batch modification

To test:
1 - Apply patch
2 - Run a report with an itemnumber column
3 - Note there is a linked '^' after column title
4 - Hover over the '^'
5 - You should see a tooltip 'Send visible items to batch modification'
6 - Click the '^'
7 - You should be sent to batch item modification with itemnumbers that
were visible in report

Signed-off-by: George <george@nekls.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Owen Leonard 2017-12-19 16:16:46 UTC
Created attachment 69921 [details] [review]
Bug 19233: (follow-up) Send itemnumbers in report results to batch modification

This patch changes the obscure "^" symbol to a styled link with the text
"Batch modify." I think the only disadvantage of this is that it takes
up more space, but it is outweighed by the improved clarity.

This patch also makes minor indentation corrections to new lines of
HTML.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Owen Leonard 2017-12-19 16:17:37 UTC
Patches have been rebased on current master.
Comment 14 Julian Maurice 2018-03-09 12:34:11 UTC
Created attachment 72566 [details] [review]
Bug 19233 - Add ability to send itemnumbers in report results to batch modification

To test:
1 - Apply patch
2 - Run a report with an itemnumber column
3 - Note there is a linked '^' after column title
4 - Hover over the '^'
5 - You should see a tooltip 'Send visible items to batch modification'
6 - Click the '^'
7 - You should be sent to batch item modification with itemnumbers that
were visible in report

Signed-off-by: George <george@nekls.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 15 Julian Maurice 2018-03-09 12:34:15 UTC
Created attachment 72567 [details] [review]
Bug 19233: (follow-up) Send itemnumbers in report results to batch modification

This patch changes the obscure "^" symbol to a styled link with the text
"Batch modify." I think the only disadvantage of this is that it takes
up more space, but it is outweighed by the improved clarity.

This patch also makes minor indentation corrections to new lines of
HTML.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 16 Jonathan Druart 2018-03-19 19:31:29 UTC
+            $(".send_to_item_mod").click(function(e){
+                e.preventDefault();
+                $("#report_results").attr("action","/cgi-bin/koha/tools/batchMod.pl");
+                $("#report_results").submit();
+            });

This sounds hacky at first glance, why this trick?
Comment 17 Nick Clemens 2018-03-21 15:18:03 UTC
(In reply to Jonathan Druart from comment #16)
> +            $(".send_to_item_mod").click(function(e){
> +                e.preventDefault();
> +               
> $("#report_results").attr("action","/cgi-bin/koha/tools/batchMod.pl");
> +                $("#report_results").submit();
> +            });
> 
> This sounds hacky at first glance, why this trick?

Ah, I believe I was thinking we could expand the options here, allow sending the itemnumbers elsewhere as well ('Add to list','batch delete' etc.)

Setting the action in the JS let me plan for different actions depending on where we send. 

I implemented batch-mod as a starting point
Comment 18 Jonathan Druart 2018-03-23 15:01:27 UTC
If not used it should be removed.
Comment 19 Nick Clemens 2018-03-27 17:31:44 UTC
Created attachment 73344 [details] [review]
Bug 19233: (follow-up) Don't use JS trickery to set form action
Comment 20 Nick Clemens 2018-03-27 17:48:46 UTC
Created attachment 73345 [details] [review]
Bug 19233: (follow-up) Use a button to submit form
Comment 21 Nick Clemens 2018-03-27 17:51:01 UTC
Created attachment 73346 [details] [review]
Bug 19233: (follow-up) Use a button to submit form
Comment 22 Nick Clemens 2018-03-27 17:52:44 UTC
Created attachment 73347 [details] [review]
Bug 19233: (follow-up) Use a button to submit form
Comment 23 Jonathan Druart 2018-03-27 20:53:28 UTC
Created attachment 73356 [details] [review]
Bug 19233: Restore styling of the button
Comment 24 Jonathan Druart 2018-03-27 20:55:28 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 25 Nick Clemens 2018-04-23 22:53:16 UTC
Awesome work all, enhancement, not backported for stable