https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29906
Bug ID: 29906
Summary: When changing hold parameters over API (PUT) it
forcibly gets to "suspended" state
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Hold requests
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
This change:
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127244&action=diff
- my $suspended_until = exists $body->{suspended_until} ?
$body->{suspended_until} : $hold->suspend_until;
+ my $suspended_until =
+ exists $body->{suspended_until}
+ ? dt_from_string( $body->{suspended_until}, 'rfc3339' )
+ : dt_from_string( $hold->suspend_until, 'iso' );
Breaks passing "undef" in $hold->suspend_until
as well as "undef" in $body->{suspended_until}
to:
my $params = {
...
suspend_until => $suspended_until
and always comes with date, it has "today date" instead of "udef" because:
sub dt_from_string has:
return DateTime->now( time_zone => $tz ) unless $date_string;
so as a result when you are changing any hold location (for example) from API,
it also puts that hold to be suspended.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/