Bug 32034 - Library branch transfers should be in the action logs
Summary: Library branch transfers should be in the action logs
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-28 11:04 UTC by Kyle M Hall
Modified: 2023-03-03 21:35 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 32034: Add item transfers to action logs (8.97 KB, patch)
2022-12-12 20:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 32034: Add item transfers to action logs (8.96 KB, patch)
2022-12-14 15:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 32366: (bug 30460 follow-up) Add tests (2.59 KB, patch)
2022-12-14 15:40 UTC, ByWater Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2022-10-28 11:04:16 UTC
Having branch transfers in the action logs would help to more fully show the cycle of holds that require transfers.
Comment 1 Kyle M Hall 2022-12-12 20:07:53 UTC
Created attachment 144543 [details] [review]
Bug 32034: Add item transfers to action logs

Having branch transfers in the action logs would help to more fully show the cycle of holds that require transfers.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the new syspref LogTransfers
5) Create and finish some transfers, note the new logs in the log
   viewer!
Comment 2 Andrew Fuerste-Henry 2022-12-14 14:52:54 UTC
This works, but there's a typo that causes the module to get written as "TRANFERS" rather than "TRANSFERS" (missing the 1st S). I tried to edit it and sign off on the amended patch, but I did something wrong and git yelled at me.
Comment 3 Kyle M Hall 2022-12-14 15:30:04 UTC
Created attachment 144581 [details] [review]
Bug 32034: Add item transfers to action logs
Comment 4 Kyle M Hall 2022-12-14 15:30:31 UTC
(In reply to Andrew Fuerste-Henry from comment #2)
> This works, but there's a typo that causes the module to get written as
> "TRANFERS" rather than "TRANSFERS" (missing the 1st S). I tried to edit it
> and sign off on the amended patch, but I did something wrong and git yelled
> at me.

Good catch! Fixed!
Comment 5 ByWater Sandboxes 2022-12-14 15:40:38 UTC
Created attachment 144582 [details] [review]
Bug 32366: (bug 30460 follow-up) Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Comment 6 Andrew Fuerste-Henry 2023-01-09 16:07:06 UTC
I'm not sure what happened when I tried to sign off on this before, but I can confirm this patch doesn't apply. I get this error in the provision logs:

TASK [Apply bug 32034 via git-bz in docker container] **************************
fatal: [localhost -> koha-boo]: FAILED! => {"changed": true, "cmd": "cd /kohadevbox/koha && yes | git bz apply 32034", "delta": "0:00:05.882738", "end": "2023-01-09 15:54:40.137836", "msg": "non-zero return code", "rc": 1, "start": "2023-01-09 15:54:34.255098", "stderr": "Traceback (most recent call last):\n  File \"/usr/bin/git-bz\", line 2716, in <module>\n    applied = do_apply(bug_ref)\n  File \"/usr/bin/git-bz\", line 1791, in do_apply\n    print \"%d - %s\" % (patch.attach_id, patch.description)\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\xa0' in position 12: ordinal not in range(128)", "stderr_lines": ["Traceback (most recent call last):", "  File \"/usr/bin/git-bz\", line 2716, in <module>", "    applied = do_apply(bug_ref)", "  File \"/usr/bin/git-bz\", line 1791, in do_apply", "    print \"%d - %s\" % (patch.attach_id, patch.description)", "UnicodeEncodeError: 'ascii' codec can't encode character u'\\xa0' in position 12: ordinal not in range(128)"], "stdout": "\nBug 32034 - Library branch transfers should be in the action logs", "stdout_lines": ["", "Bug 32034 - Library branch transfers should be in the action logs"]}
Comment 7 Kyle M Hall 2023-01-09 16:43:25 UTC
(In reply to Andrew Fuerste-Henry from comment #6)
> I'm not sure what happened when I tried to sign off on this before, but I
> can confirm this patch doesn't apply. I get this error in the provision logs:


Ack! The unicode error again!

I was able to go into your sandbox and apply the bug using the koha-qa alias. No errors. I suppose that means ansible doesn't like some unicode character in the file or something.

In any case, I created a sandbox for you with this patch applied: https://sandbox.bywatersolutions.com/ so you should be good to go!
Comment 8 Marcel de Rooy 2023-02-24 10:26:37 UTC
        * Commit title does not start with 'Bug XXXXX: ' - ce32863a1e
Comment 9 Marcel de Rooy 2023-02-24 10:28:17 UTC
(In reply to Marcel de Rooy from comment #8)
>         * Commit title does not start with 'Bug XXXXX: ' - ce32863a1e

Fixed but a strange one..
Comment 10 Marcel de Rooy 2023-02-24 10:29:19 UTC
(In reply to Marcel de Rooy from comment #9)
> (In reply to Marcel de Rooy from comment #8)
> >         * Commit title does not start with 'Bug XXXXX: ' - ce32863a1e
> 
> Fixed but a strange one..

[PATCH] =?utf-8?q?Bug=C2=A032034:=20Add=20item=20transfers=20to?=
 =?utf-8?q?=20action=20logs?=
Comment 11 Marcel de Rooy 2023-02-24 10:32:15 UTC
Viewing history and commit message, this never got a signoff. Changing status.
Comment 12 hebah 2023-03-03 21:35:04 UTC
Wanted to sign off on this as several partners are very interested in it, but looks like it hit the same encoding error as when Andrew tested:

TASK [Apply bug 32034 via git-bz in docker container] **************************
fatal: [localhost -> koha-transferlog]: FAILED! => {"changed": true, "cmd": "koha-shell -c 'cd /kohadevbox/koha && yes | git bz apply 32034' transferlog", "delta": "0:00:03.408310", "end": "2023-03-03 21:17:20.388399", "msg": "non-zero return code", "rc": 1, "start": "2023-03-03 21:17:16.980089", "stderr": "Traceback (most recent call last):\n  File \"/usr/bin/git-bz\", line 2716, in <module>\n    applied = do_apply(bug_ref)\n  File \"/usr/bin/git-bz\", line 1791, in do_apply\n    print \"%d - %s\" % (patch.attach_id, patch.description)\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\xa0' in position 12: ordinal not in range(128)", "stderr_lines": ["Traceback (most recent call last):", "  File \"/usr/bin/git-bz\", line 2716, in <module>", "    applied = do_apply(bug_ref)", "  File \"/usr/bin/git-bz\", line 1791, in do_apply", "    print \"%d - %s\" % (patch.attach_id, patch.description)", "UnicodeEncodeError: 'ascii' codec can't encode character u'\\xa0' in position 12: ordinal not in range(128)"], "stdout": "\nBug 32034 - Library branch transfers should be in the action logs", "stdout_lines": ["", "Bug 32034 - Library branch transfers should be in the action logs"]}