View | Details | Raw Unified | Return to bug 13005
Collapse All | Expand All

(-)a/C4/Suggestions.pm (+3 lines)
Lines 427-432 sub NewSuggestion { Link Here
427
    my ($suggestion) = @_;
427
    my ($suggestion) = @_;
428
428
429
    $suggestion->{STATUS} = "ASKED" unless $suggestion->{STATUS};
429
    $suggestion->{STATUS} = "ASKED" unless $suggestion->{STATUS};
430
    $suggestion->{budgetid} ||= undef;
430
431
431
    my $rs = Koha::Database->new->schema->resultset('Suggestion');
432
    my $rs = Koha::Database->new->schema->resultset('Suggestion');
432
    return $rs->create($suggestion)->id;
433
    return $rs->create($suggestion)->id;
Lines 449-454 sub ModSuggestion { Link Here
449
    my ($suggestion) = @_;
450
    my ($suggestion) = @_;
450
    return unless( $suggestion and defined($suggestion->{suggestionid}) );
451
    return unless( $suggestion and defined($suggestion->{suggestionid}) );
451
452
453
    $suggestion->{budgetid} ||= undef;
454
452
    my $rs = Koha::Database->new->schema->resultset('Suggestion')->find($suggestion->{suggestionid});
455
    my $rs = Koha::Database->new->schema->resultset('Suggestion')->find($suggestion->{suggestionid});
453
    my $status_update_table = 1;
456
    my $status_update_table = 1;
454
    eval {
457
    eval {
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +9 lines)
Lines 8781-8786 if ( CheckVersion($DBversion) ) { Link Here
8781
    SetVersion($DBversion);
8781
    SetVersion($DBversion);
8782
}
8782
}
8783
8783
8784
$DBversion = '3.17.00.XXX';
8785
if ( CheckVersion($DBversion) ) {
8786
    $dbh->do(q{
8787
        UPDATE suggestions SET budgetid=NULL WHERE budgetid=0
8788
    });
8789
    print "Upgrade to $DBversion done (Bug 13005: suggestions.budgetid should be NULL if not filled)\n";
8790
    SetVersion($DBversion);
8791
}
8792
8784
=head1 FUNCTIONS
8793
=head1 FUNCTIONS
8785
8794
8786
=head2 TableExists($table)
8795
=head2 TableExists($table)
8787
- 

Return to bug 13005