To recreate: 1. Make a new suggestion in the staff interface and attempt to set the "Created by" patron to someone other than the logged in user. 2. Submit the suggestion. 3. select suggestedby from suggestions where suggestionid = X; ( Where X is the suggestionid ) 4. The value is NULL 5. On suggestion/suggestion.pl the "Suggested by" column is blank.
In the select_suggester() function data.borrowernumber is incorrect. It should be data.patron_id
Created attachment 162520 [details] [review] Bug 36187: Corrected set data.patron_id in select_suggestor() To test: 1. Make a new suggestion in the staff interface and attempt to set the "Created by" patron to someone other than the logged in user. 2. Submit the suggestion. 3. select suggestedby from suggestions where suggestionid = X; ( Where X is the suggestionid ) 4. The value is NULL 5. On suggestion/suggestion.pl the "Suggested by" column is blank. 6. APPLY PATCH 7. Try 1 - 3 again. This time the suggestedby should be correctly set.
Created attachment 162675 [details] [review] Bug 36187: Corrected set data.patron_id in select_suggestor() To test: 1. Make a new suggestion in the staff interface and attempt to set the "Created by" patron to someone other than the logged in user. 2. Submit the suggestion. 3. select suggestedby from suggestions where suggestionid = X; ( Where X is the suggestionid ) 4. The value is NULL 5. On suggestion/suggestion.pl the "Suggested by" column is blank. 6. APPLY PATCH 7. Try 1 - 3 again. This time the suggestedby should be correctly set.
Created attachment 162683 [details] [review] Bug 36187: Corrected set data.patron_id in select_suggestor() To test: 1. Make a new suggestion in the staff interface and attempt to set the "Created by" patron to someone other than the logged in user. 2. Submit the suggestion. 3. select suggestedby from suggestions where suggestionid = X; ( Where X is the suggestionid ) 4. The value is NULL 5. On suggestion/suggestion.pl the "Suggested by" column is blank. 6. APPLY PATCH 7. Try 1 - 3 again. This time the suggestedby should be correctly set. Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Created attachment 163972 [details] [review] Bug 36187: Corrected set data.patron_id in select_suggestor() To test: 1. Make a new suggestion in the staff interface and attempt to set the "Created by" patron to someone other than the logged in user. 2. Submit the suggestion. 3. select suggestedby from suggestions where suggestionid = X; ( Where X is the suggestionid ) 4. The value is NULL 5. On suggestion/suggestion.pl the "Suggested by" column is blank. 6. APPLY PATCH 7. Try 1 - 3 again. This time the suggestedby should be correctly set. Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Works, makes sense, QA script happy, code looks good, passing QA :)
Pushed for 24.05! Well done everyone, thank you!
Looks like it depends on Bug 35329 not in 23.11.x.
(In reply to Fridolin Somers from comment #8) > Looks like it depends on Bug 35329 not in 23.11.x. Ah nope, I reproduce in 23.11.x Since this is Ajax with REST API the data contains API-named fields. See https://git.koha-community.org/Koha-community/Koha/src/branch/23.11.x/Koha/Patron.pm#L2423 Pushed to 23.11.x for 23.11.08
Not backporting to 23.05.x unless requested
Bug fix. Nothing to add or edit in the manual. Please reopen with more details if that is not the case!