https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36820
--- Comment #7 from Jonathan Druart <[email protected]> --- (In reply to Lucas Gass (lukeg) from comment #6) > Could this patch just be: > > - if ( $emailpurchasesuggestions && $self->STATUS eq 'ASKED' ) { > + if ( $emailpurchasesuggestions && $new_suggestion ) { > > > > ? I don't think so. $new_suggestion is set if the object is not in storage (ie. the object does not exist yet). Here we want to test in an edition context. use t::lib::TestBuilder; my $builder = t::lib::TestBuilder->new; my $suggestion = $builder->build_object({class => 'Koha::Suggestions'}); say $suggestion->in_storage; say $suggestion->quantity; $suggestion->quantity(42); say $suggestion->in_storage; say $suggestion->quantity; say join ", ", $suggestion->_result->get_dirty_columns; will output: 1 17450 1 42 quantity, 42 -- You are receiving this mail because: 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/
