if ( $issue->set({ notedate => dt_from_string(), note => $clean_note, noteseen => 0 })->store ) {
if ($clean_note) { # only send email if note not empty
my $branch = Koha::Libraries->find( $issue->branchcode );
if ( $issue->set({ notedate => dt_from_string(), note => $clean_note, noteseen => 0 })->store ) {
if ($clean_note) { # only send email if note not empty
my $branch = Koha::Libraries->find( $issue->branchcode );