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

(-)a/C4/Suggestions.pm (-69 lines)
Lines 233-307 sub GetSuggestionByStatus { Link Here
233
    return $results;
233
    return $results;
234
}
234
}
235
235
236
=head2 NewSuggestion
237
238
239
&NewSuggestion($suggestion);
240
241
Insert a new suggestion on database with value given on input arg.
242
243
=cut
244
245
sub NewSuggestion {
246
    my ($suggestion) = @_;
247
248
    $suggestion->{STATUS} = "ASKED" unless $suggestion->{STATUS};
249
250
    $suggestion->{suggesteddate} = dt_from_string unless $suggestion->{suggesteddate};
251
252
    delete $suggestion->{branchcode}
253
      if defined $suggestion->{branchcode} and $suggestion->{branchcode} eq '';
254
255
    my $suggestion_object = Koha::Suggestion->new( $suggestion )->store;
256
    my $suggestion_id = $suggestion_object->suggestionid;
257
258
    my $emailpurchasesuggestions = C4::Context->preference("EmailPurchaseSuggestions");
259
    if ($emailpurchasesuggestions) {
260
        my $full_suggestion = GetSuggestion( $suggestion_id); # We should not need to refetch it!
261
        if (
262
            my $letter = C4::Letters::GetPreparedLetter(
263
                module      => 'suggestions',
264
                letter_code => 'NEW_SUGGESTION',
265
                tables      => {
266
                    'branches'    => $full_suggestion->{branchcode},
267
                    'borrowers'   => $full_suggestion->{suggestedby},
268
                    'suggestions' => $full_suggestion,
269
                },
270
            )
271
        ){
272
273
            my $toaddress;
274
            if ( $emailpurchasesuggestions eq "BranchEmailAddress" ) {
275
                my $library =
276
                  Koha::Libraries->find( $full_suggestion->{branchcode} );
277
                $toaddress = $library->inbound_email_address;
278
            }
279
            elsif ( $emailpurchasesuggestions eq "KohaAdminEmailAddress" ) {
280
                $toaddress = C4::Context->preference('ReplytoDefault')
281
                  || C4::Context->preference('KohaAdminEmailAddress');
282
            }
283
            else {
284
                $toaddress =
285
                     C4::Context->preference($emailpurchasesuggestions)
286
                  || C4::Context->preference('ReplytoDefault')
287
                  || C4::Context->preference('KohaAdminEmailAddress');
288
            }
289
290
            C4::Letters::EnqueueLetter(
291
                {
292
                    letter         => $letter,
293
                    borrowernumber => $full_suggestion->{suggestedby},
294
                    suggestionid   => $full_suggestion->{suggestionid},
295
                    to_address     => $toaddress,
296
                    message_transport_type => 'email',
297
                }
298
            ) or warn "can't enqueue letter $letter";
299
        }
300
    }
301
302
    return $suggestion_id;
303
}
304
305
=head2 ModSuggestion
236
=head2 ModSuggestion
306
237
307
&ModSuggestion($suggestion)
238
&ModSuggestion($suggestion)
(-)a/Koha/Suggestion.pm (-1 / +65 lines)
Lines 46-56 a suggesteddate of today Link Here
46
sub store {
46
sub store {
47
    my ($self) = @_;
47
    my ($self) = @_;
48
48
49
    $self->STATUS("ASKED") unless $self->STATUS;
50
51
    $self->branchcode(undef) if $self->branchcode eq '';
49
    unless ( $self->suggesteddate() ) {
52
    unless ( $self->suggesteddate() ) {
50
        $self->suggesteddate( dt_from_string()->ymd );
53
        $self->suggesteddate( dt_from_string()->ymd );
51
    }
54
    }
52
55
53
    return $self->SUPER::store();
56
    my $emailpurchasesuggestions = C4::Context->preference("EmailPurchaseSuggestions");
57
58
    my $result = $self->SUPER::store();
59
60
    if( $emailpurchasesuggestions ){
61
62
        if (
63
            my $letter = C4::Letters::GetPreparedLetter(
64
                module      => 'suggestions',
65
                letter_code => 'NEW_SUGGESTION',
66
                tables      => {
67
                    'branches'    => $result->branchcode,
68
                    'borrowers'   => $result->suggestedby,
69
                    'suggestions' => $result->unblessed,
70
                },
71
            )
72
        ){
73
74
            my $toaddress;
75
            if ( $emailpurchasesuggestions eq "BranchEmailAddress" ) {
76
                my $library = $result->library;
77
                $toaddress = $library->inbound_email_address;
78
            }
79
            elsif ( $emailpurchasesuggestions eq "KohaAdminEmailAddress" ) {
80
                $toaddress = C4::Context->preference('ReplytoDefault')
81
                  || C4::Context->preference('KohaAdminEmailAddress');
82
            }
83
            else {
84
                $toaddress =
85
                     C4::Context->preference($emailpurchasesuggestions)
86
                  || C4::Context->preference('ReplytoDefault')
87
                  || C4::Context->preference('KohaAdminEmailAddress');
88
            }
89
90
            C4::Letters::EnqueueLetter(
91
                {
92
                    letter         => $letter,
93
                    borrowernumber => $result->suggestedby,
94
                    suggestionid   => $result->id,
95
                    to_address     => $toaddress,
96
                    message_transport_type => 'email',
97
                }
98
            ) or warn "can't enqueue letter $letter";
99
        }
100
    }
101
102
    return $result;
103
}
104
105
=head3 library
106
107
my $library = $suggestion->library;
108
109
Returns the library of the suggestion (Koha::Library for branchcode field)
110
111
=cut
112
113
sub library {
114
    my ($self) = @_;
115
    my $library_rs = $self->_result->branchcode;
116
    return unless $library_rs;
117
    return Koha::Library->_new_from_dbic($library_rs);
54
}
118
}
55
119
56
=head3 suggester
120
=head3 suggester
(-)a/opac/opac-suggestions.pl (-2 / +2 lines)
Lines 27-33 use C4::Output qw( output_html_with_http_headers ); Link Here
27
use C4::Suggestions qw(
27
use C4::Suggestions qw(
28
    DelSuggestion
28
    DelSuggestion
29
    MarcRecordFromNewSuggestion
29
    MarcRecordFromNewSuggestion
30
    NewSuggestion
31
);
30
);
32
use C4::Koha qw( GetAuthorisedValues );
31
use C4::Koha qw( GetAuthorisedValues );
33
use C4::Scrubber;
32
use C4::Scrubber;
Lines 36-41 use C4::Search qw( FindDuplicate ); Link Here
36
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
37
use Koha::Libraries;
36
use Koha::Libraries;
38
use Koha::Patrons;
37
use Koha::Patrons;
38
use Koha::Suggestions;
39
39
40
use Koha::DateUtils qw( dt_from_string );
40
use Koha::DateUtils qw( dt_from_string );
41
41
Lines 200-206 if ( $op eq "add_confirm" ) { Link Here
200
        $suggestion->{branchcode} = $input->param('branchcode') || C4::Context->userenv->{"branch"};
200
        $suggestion->{branchcode} = $input->param('branchcode') || C4::Context->userenv->{"branch"};
201
        $suggestion->{STATUS} = 'ASKED';
201
        $suggestion->{STATUS} = 'ASKED';
202
202
203
        &NewSuggestion($suggestion);
203
        Koha::Suggestion->new($suggestion)->store();
204
        $patrons_pending_suggestions_count++;
204
        $patrons_pending_suggestions_count++;
205
        $patrons_total_suggestions_count++;
205
        $patrons_total_suggestions_count++;
206
206
(-)a/suggestion/suggestion.pl (-1 / +2 lines)
Lines 32-37 use Koha::AuthorisedValues; Link Here
32
use Koha::Acquisition::Currencies;
32
use Koha::Acquisition::Currencies;
33
use Koha::Libraries;
33
use Koha::Libraries;
34
use Koha::Patrons;
34
use Koha::Patrons;
35
use Koha::Suggestions;
35
36
36
use URI::Escape qw( uri_escape );
37
use URI::Escape qw( uri_escape );
37
38
Lines 232-238 if ( $op =~ /save/i ) { Link Here
232
            }
233
            }
233
            else {
234
            else {
234
                ## Adding some informations related to suggestion
235
                ## Adding some informations related to suggestion
235
                &NewSuggestion($suggestion_only);
236
                Koha::Suggestion->new($suggestion_only)->store();
236
            }
237
            }
237
            # empty fields, to avoid filter in "SearchSuggestion"
238
            # empty fields, to avoid filter in "SearchSuggestion"
238
        }
239
        }
(-)a/t/db_dependent/Suggestions.t (-33 / +37 lines)
Lines 34-40 use Koha::Patrons; Link Here
34
use Koha::Suggestions;
34
use Koha::Suggestions;
35
35
36
BEGIN {
36
BEGIN {
37
    use_ok('C4::Suggestions', qw( NewSuggestion GetSuggestion ModSuggestion GetSuggestionInfo GetSuggestionFromBiblionumber GetSuggestionInfoFromBiblionumber GetSuggestionByStatus ConnectSuggestionAndBiblio DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ));
37
    use_ok('C4::Suggestions', qw( GetSuggestion ModSuggestion GetSuggestionInfo GetSuggestionFromBiblionumber GetSuggestionInfoFromBiblionumber GetSuggestionByStatus ConnectSuggestionAndBiblio DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ));
38
}
38
}
39
39
40
my $schema  = Koha::Database->new->schema;
40
my $schema  = Koha::Database->new->schema;
Lines 159-179 my $my_suggestion_without_suggestedby = { Link Here
159
    quantity      => '', # Insert an empty string into int to catch strict SQL modes errors
159
    quantity      => '', # Insert an empty string into int to catch strict SQL modes errors
160
};
160
};
161
161
162
my $my_suggestionid = NewSuggestion($my_suggestion);
162
my $my_suggestion_object = Koha::Suggestion->new($my_suggestion)->store;
163
isnt( $my_suggestionid, 0, 'NewSuggestion returns an not null id' );
163
my $my_suggestionid = $my_suggestion_object->id;
164
my $my_suggestionid_with_budget = NewSuggestion($my_suggestion_with_budget);
164
isnt( $my_suggestionid, 0, 'Suggestion is correctly saved' );
165
my $my_suggestion_with_budget_object = Koha::Suggestion->new($my_suggestion_with_budget)->store;
166
my $my_suggestionid_with_budget = $my_suggestion_with_budget_object->id;
165
167
166
is( GetSuggestion(), undef, 'GetSuggestion without the suggestion id returns undef' );
168
is( GetSuggestion(), undef, 'GetSuggestion without the suggestion id returns undef' );
167
my $suggestion = GetSuggestion($my_suggestionid);
169
my $suggestion = GetSuggestion($my_suggestionid);
168
is( $suggestion->{title}, $my_suggestion->{title}, 'NewSuggestion stores the title correctly' );
170
is( $suggestion->{title}, $my_suggestion->{title}, 'Suggestion stores the title correctly' );
169
is( $suggestion->{author}, $my_suggestion->{author}, 'NewSuggestion stores the author correctly' );
171
is( $suggestion->{author}, $my_suggestion->{author}, 'Suggestion stores the author correctly' );
170
is( $suggestion->{publishercode}, $my_suggestion->{publishercode}, 'NewSuggestion stores the publishercode correctly' );
172
is( $suggestion->{publishercode}, $my_suggestion->{publishercode}, 'Suggestion stores the publishercode correctly' );
171
is( $suggestion->{suggestedby}, $my_suggestion->{suggestedby}, 'NewSuggestion stores the borrower number correctly' );
173
is( $suggestion->{suggestedby}, $my_suggestion->{suggestedby}, 'Suggestion stores the borrower number correctly' );
172
is( $suggestion->{biblionumber}, $my_suggestion->{biblionumber}, 'NewSuggestion stores the biblio number correctly' );
174
is( $suggestion->{biblionumber}, $my_suggestion->{biblionumber}, 'Suggestion stores the biblio number correctly' );
173
is( $suggestion->{STATUS}, 'ASKED', 'NewSuggestion stores a suggestion with the status ASKED by default' );
175
is( $suggestion->{STATUS}, 'ASKED', 'Suggestion stores a suggestion with the status ASKED by default' );
174
is( $suggestion->{managedby}, undef, 'NewSuggestion stores empty string as undef for non existent foreign key (integer)' );
176
is( $suggestion->{managedby}, undef, 'Suggestion stores empty string as undef for non existent foreign key (integer)' );
175
is( $suggestion->{manageddate}, undef, 'NewSuggestion stores empty string as undef for date' );
177
is( $suggestion->{manageddate}, undef, 'Suggestion stores empty string as undef for date' );
176
is( $suggestion->{budgetid}, undef, 'NewSuggestion should set budgetid to NULL if not given' );
178
is( $suggestion->{budgetid}, undef, 'Suggestion should set budgetid to NULL if not given' );
177
179
178
is( ModSuggestion(), undef, 'ModSuggestion without the suggestion returns undef' );
180
is( ModSuggestion(), undef, 'ModSuggestion without the suggestion returns undef' );
179
my $mod_suggestion1 = {
181
my $mod_suggestion1 = {
Lines 240-246 $messages = C4::Letters::GetQueuedMessages({ Link Here
240
is ($messages->[1]->{message_transport_type}, 'sms', 'When FallbackToSMSIfNoEmail syspref is enabled the suggestion message_transport_type is sms if the borrower has no email');
242
is ($messages->[1]->{message_transport_type}, 'sms', 'When FallbackToSMSIfNoEmail syspref is enabled the suggestion message_transport_type is sms if the borrower has no email');
241
243
242
#Make a new suggestion for a borrower with defined email and no smsalertnumber
244
#Make a new suggestion for a borrower with defined email and no smsalertnumber
243
my $my_suggestion_2_id = NewSuggestion($my_suggestion_with_budget2);
245
my $my_suggestion_2_object = Koha::Suggestion->new($my_suggestion_with_budget2)->store();
246
my $my_suggestion_2_id = $my_suggestion_2_object->id;
244
247
245
#Check the message_transport_type when the 'FallbackToSMSIfNoEmail' syspref is enabled and the borrower has a defined email and no smsalertnumber
248
#Check the message_transport_type when the 'FallbackToSMSIfNoEmail' syspref is enabled and the borrower has a defined email and no smsalertnumber
246
t::lib::Mocks::mock_preference( 'FallbackToSMSIfNoEmail', 1 );
249
t::lib::Mocks::mock_preference( 'FallbackToSMSIfNoEmail', 1 );
Lines 334-340 my $del_suggestion = { Link Here
334
    STATUS => 'CHECKED',
337
    STATUS => 'CHECKED',
335
    suggestedby => $borrowernumber,
338
    suggestedby => $borrowernumber,
336
};
339
};
337
my $del_suggestionid = NewSuggestion($del_suggestion);
340
my $del_suggestion_object = Koha::Suggestion->new($del_suggestion)->store();
341
my $del_suggestionid = $del_suggestion_object->id;
338
342
339
is( DelSuggestion(), '0E0', 'DelSuggestion without arguments returns 0E0' );
343
is( DelSuggestion(), '0E0', 'DelSuggestion without arguments returns 0E0' );
340
is( DelSuggestion($borrowernumber), '', 'DelSuggestion without the suggestion id returns an empty string' );
344
is( DelSuggestion($borrowernumber), '', 'DelSuggestion without the suggestion id returns an empty string' );
Lines 348-361 is( $suggestions->[1]->{title}, $del_suggestion->{title}, 'DelSuggestion deletes Link Here
348
352
349
# Test budgetid fk
353
# Test budgetid fk
350
$my_suggestion->{budgetid} = ''; # If budgetid == '', NULL should be set in DB
354
$my_suggestion->{budgetid} = ''; # If budgetid == '', NULL should be set in DB
351
my $my_suggestionid_test_budgetid = NewSuggestion($my_suggestion);
355
my $my_suggestionid_test_budget_object = Koha::Suggestion->new($my_suggestion)->store;
356
my $my_suggestionid_test_budgetid = $my_suggestionid_test_budget_object->id;
352
$suggestion = GetSuggestion($my_suggestionid_test_budgetid);
357
$suggestion = GetSuggestion($my_suggestionid_test_budgetid);
353
is( $suggestion->{budgetid}, undef, 'NewSuggestion Should set budgetid to NULL if equals an empty string' );
358
is( $suggestion->{budgetid}, undef, 'Suggestion Should set budgetid to NULL if equals an empty string' );
354
359
355
$my_suggestion->{budgetid} = ''; # If budgetid == '', NULL should be set in DB
360
$my_suggestion->{budgetid} = ''; # If budgetid == '', NULL should be set in DB
356
ModSuggestion( $my_suggestion );
361
ModSuggestion( $my_suggestion );
357
$suggestion = GetSuggestion($my_suggestionid_test_budgetid);
362
$suggestion = GetSuggestion($my_suggestionid_test_budgetid);
358
is( $suggestion->{budgetid}, undef, 'NewSuggestion Should set budgetid to NULL if equals an empty string' );
363
is( $suggestion->{budgetid}, undef, 'Suggestion Should set budgetid to NULL if equals an empty string' );
359
364
360
my $suggestion2 = {
365
my $suggestion2 = {
361
    title => "Cuisine d'automne",
366
    title => "Cuisine d'automne",
Lines 378-384 is($record->field( $author_tag )->subfield( $author_subfield ), "Catherine", "Re Link Here
378
subtest 'GetUnprocessedSuggestions' => sub {
383
subtest 'GetUnprocessedSuggestions' => sub {
379
    plan tests => 11;
384
    plan tests => 11;
380
    $dbh->do(q|DELETE FROM suggestions|);
385
    $dbh->do(q|DELETE FROM suggestions|);
381
    my $my_suggestionid         = NewSuggestion($my_suggestion);
386
    my $my_suggestionid         = Koha::Suggestion->new($my_suggestion)->store->id;
382
    my $unprocessed_suggestions = C4::Suggestions::GetUnprocessedSuggestions;
387
    my $unprocessed_suggestions = C4::Suggestions::GetUnprocessedSuggestions;
383
    is( scalar(@$unprocessed_suggestions), 0, 'GetUnprocessedSuggestions should return 0 if a suggestion has been processed but not linked to a fund' );
388
    is( scalar(@$unprocessed_suggestions), 0, 'GetUnprocessedSuggestions should return 0 if a suggestion has been processed but not linked to a fund' );
384
    my $status     = ModSuggestion($mod_suggestion1);
389
    my $status     = ModSuggestion($mod_suggestion1);
Lines 452-486 subtest 'EmailPurchaseSuggestions' => sub { Link Here
452
457
453
    # EmailPurchaseSuggestions set to disabled
458
    # EmailPurchaseSuggestions set to disabled
454
    t::lib::Mocks::mock_preference( "EmailPurchaseSuggestions", "0" );
459
    t::lib::Mocks::mock_preference( "EmailPurchaseSuggestions", "0" );
455
    NewSuggestion($my_suggestion);
460
    Koha::Suggestion->new($my_suggestion)->store;
456
    my $newsuggestions_messages = C4::Letters::GetQueuedMessages(
461
    my $newsuggestions_messages = C4::Letters::GetQueuedMessages(
457
        {
462
        {
458
            borrowernumber => $borrowernumber
463
            borrowernumber => $borrowernumber
459
        }
464
        }
460
    );
465
    );
461
    is( @$newsuggestions_messages, 0,
466
    is( @$newsuggestions_messages, 0,
462
        'NewSuggestions does not send an email when disabled' );
467
        'New suggestion does not send an email when EmailPurchaseSuggestions disabled' );
463
468
464
    # EmailPurchaseSuggestions set to BranchEmailAddress
469
    # EmailPurchaseSuggestions set to BranchEmailAddress
465
    t::lib::Mocks::mock_preference( "EmailPurchaseSuggestions",
470
    t::lib::Mocks::mock_preference( "EmailPurchaseSuggestions",
466
        "BranchEmailAddress" );
471
        "BranchEmailAddress" );
467
    NewSuggestion($my_suggestion);
472
    Koha::Suggestion->new($my_suggestion)->store;
468
473
469
    t::lib::Mocks::mock_preference( "ReplytoDefault", 'library@b.c' );
474
    t::lib::Mocks::mock_preference( "ReplytoDefault", 'library@b.c' );
470
    NewSuggestion($my_suggestion);
475
    Koha::Suggestion->new($my_suggestion)->store;
471
476
472
    Koha::Libraries->find('CPL')->update( { branchemail => 'branchemail@hosting.com' } );
477
    Koha::Libraries->find('CPL')->update( { branchemail => 'branchemail@hosting.com' } );
473
    NewSuggestion($my_suggestion);
478
    Koha::Suggestion->new($my_suggestion)->store;
474
479
475
    Koha::Libraries->find('CPL')->update( { branchreplyto => 'branchemail@b.c' } );
480
    Koha::Libraries->find('CPL')->update( { branchreplyto => 'branchemail@b.c' } );
476
    NewSuggestion($my_suggestion);
481
    Koha::Suggestion->new($my_suggestion)->store;
477
482
478
    $newsuggestions_messages = C4::Letters::GetQueuedMessages(
483
    $newsuggestions_messages = C4::Letters::GetQueuedMessages(
479
        {
484
        {
480
            borrowernumber => $borrowernumber
485
            borrowernumber => $borrowernumber
481
        }
486
        }
482
    );
487
    );
483
    isnt( @$newsuggestions_messages, 0, 'NewSuggestions sends an email' );
488
    isnt( @$newsuggestions_messages, 0, 'New suggestions sends an email wne EmailPurchaseSuggestions enabled' );
484
    my $message1 =
489
    my $message1 =
485
      C4::Letters::GetMessage( $newsuggestions_messages->[0]->{message_id} );
490
      C4::Letters::GetMessage( $newsuggestions_messages->[0]->{message_id} );
486
    is( $message1->{to_address}, 'noreply@hosting.com',
491
    is( $message1->{to_address}, 'noreply@hosting.com',
Lines 507-516 subtest 'EmailPurchaseSuggestions' => sub { Link Here
507
        "KohaAdminEmailAddress" );
512
        "KohaAdminEmailAddress" );
508
513
509
    t::lib::Mocks::mock_preference( "ReplytoDefault", undef );
514
    t::lib::Mocks::mock_preference( "ReplytoDefault", undef );
510
    NewSuggestion($my_suggestion);
515
    Koha::Suggestion->new($my_suggestion)->store;
511
516
512
    t::lib::Mocks::mock_preference( "ReplytoDefault", 'library@b.c' );
517
    t::lib::Mocks::mock_preference( "ReplytoDefault", 'library@b.c' );
513
    NewSuggestion($my_suggestion);
518
    Koha::Suggestion->new($my_suggestion)->store;
514
519
515
    $newsuggestions_messages = C4::Letters::GetQueuedMessages(
520
    $newsuggestions_messages = C4::Letters::GetQueuedMessages(
516
        {
521
        {
Lines 531-544 subtest 'EmailPurchaseSuggestions' => sub { Link Here
531
        "EmailAddressForSuggestions" );
536
        "EmailAddressForSuggestions" );
532
537
533
    t::lib::Mocks::mock_preference( "ReplytoDefault", undef );
538
    t::lib::Mocks::mock_preference( "ReplytoDefault", undef );
534
    NewSuggestion($my_suggestion);
539
    Koha::Suggestion->new($my_suggestion)->store;
535
540
536
    t::lib::Mocks::mock_preference( "ReplytoDefault", 'library@b.c' );
541
    t::lib::Mocks::mock_preference( "ReplytoDefault", 'library@b.c' );
537
    NewSuggestion($my_suggestion);
542
    Koha::Suggestion->new($my_suggestion)->store;
538
543
539
    t::lib::Mocks::mock_preference( "EmailAddressForSuggestions",
544
    t::lib::Mocks::mock_preference( "EmailAddressForSuggestions",
540
        'suggestions@b.c' );
545
        'suggestions@b.c' );
541
    NewSuggestion($my_suggestion);
546
    Koha::Suggestion->new($my_suggestion)->store;
542
547
543
    $newsuggestions_messages = C4::Letters::GetQueuedMessages(
548
    $newsuggestions_messages = C4::Letters::GetQueuedMessages(
544
        {
549
        {
Lines 565-571 subtest 'ModSuggestion should work on suggestions without a suggester' => sub { Link Here
565
    plan tests => 2;
570
    plan tests => 2;
566
571
567
    $dbh->do(q|DELETE FROM suggestions|);
572
    $dbh->do(q|DELETE FROM suggestions|);
568
    my $my_suggestionid = NewSuggestion($my_suggestion_without_suggestedby);
573
    my $my_suggestionid = Koha::Suggestion->new($my_suggestion_without_suggestedby)->store()->id;
569
    $suggestion = GetSuggestion($my_suggestionid);
574
    $suggestion = GetSuggestion($my_suggestionid);
570
    is( $suggestion->{suggestedby}, undef, "Suggestedby is undef" );
575
    is( $suggestion->{suggestedby}, undef, "Suggestedby is undef" );
571
576
572
- 

Return to bug 33236