Browse Source
This fix permits to add an "Important" option to the marc structure pages. Testing: 1) Apply the patch 2) Run updatedatabase.pl 3) Regenerate CSS 4) Define 100 as an "important" field ( Administration » MARC bibliographic framework » MARC structure ( Default Frameword) » Edit ) 5) Define 100$a as an "important" subfield (Administration » MARC bibliographic framework » MARC structure (Default Frameword) » Subfield » Onglet a) 6) Edit a record to clear the field 100 (subfields are all blank) 7) Save the record. 8) Validate the following message: A few important fields are not filled: * tag 100 subfield a Nom de personne in tab * Field 100 is important, at least one of its subfields should be filled. Are you sure you want to save? Sponsored by the CCSR ( http://www.ccsr.qc.ca ) Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>20.05.x
simith
8 years ago
committed by
Martin Renvoize
16 changed files with 241 additions and 21 deletions
@ -0,0 +1,11 @@ |
|||
$DBversion = "XXX"; |
|||
if ( CheckVersion($DBversion) ) { |
|||
if ( !column_exists( 'marc_subfield_structure', 'important') ){ |
|||
$dbh->do("ALTER TABLE marc_subfield_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0 AFTER mandatory"); |
|||
} |
|||
if ( !column_exists( 'marc_tag_structure', 'important') ){ |
|||
$dbh->do("ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0 AFTER mandatory"); |
|||
} |
|||
SetVersion($DBversion); |
|||
print "Upgrade to $DBversion done (Bug 8643 - Add important constraint to marc subfields)\n"; |
|||
} |
Loading…
Reference in new issue