[Koha-bugs] [Bug 20067] Authorised values for ORDER_CANCELLATION_REASON are displayed on notice (catalogue/detail.pl)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 23 13:42:05 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20067

--- Comment #18 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Koha::MarcSubfieldStructures->search(
    {   
        frameworkcode => '', 
        kohafield     => 'items.materials',
        -or           => [
            { authorised_value => { not  => undef } },
            { authorised_value => { '!=' => '' } } 
        ]   
    }   
);

will generate 
SELECT `me`.`tagfield`, `me`.`tagsubfield`, `me`.`liblibrarian`,
`me`.`libopac`, `me`.`repeatable`, `me`.`mandatory`, `me`.`kohafield`,
`me`.`tab`, `me`.`authorised_value`, `me`.`authtypecode`, `me`.`value_builder`,
`me`.`isurl`, `me`.`hidden`, `me`.`frameworkcode`, `me`.`seealso`, `me`.`link`,
`me`.`defaultvalue`, `me`.`maxlength` FROM `marc_subfield_structure` `me` WHERE
( ( ( `authorised_value` IS NOT NULL OR `authorised_value` != ? ) AND
`frameworkcode` = ? AND `kohafield` = ? ) ): '', '', 'items.materials'

Which is what we want.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list