Bug 22127: Update date accessioned plugin - remove unused routine
authorJosef Moravec <josef.moravec@gmail.com>
Mon, 14 Jan 2019 11:27:32 +0000 (11:27 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 29 Mar 2019 11:28:39 +0000 (11:28 +0000)
Test plan:
1) Apply the patch
2) Have set dateaccessioned plugin to an item subfield (it is set on 952$d by default)
3) Confirm the functionality of this plugin is same as before patch

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

cataloguing/value_builder/dateaccessioned.pl

index 7a86e2d..7bc6db2 100755 (executable)
@@ -20,7 +20,6 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Biblio qw/GetMarcFromKohaField/;
 use Koha::DateUtils;
 
 my $builder = sub {
@@ -29,12 +28,8 @@ my $builder = sub {
 
     my $date = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
 
-       # find the tag/subfield mapped to items.dateaccessioned
-       my ($tag,$subfield) =  GetMarcFromKohaField("items.dateaccessioned","");
-       my $res  = <<END_OF_JS;
-<script type="text/javascript">
-//<![CDATA[
-//  
+    my $res  = <<END_OF_JS;
+<script>
 // from: cataloguing/value_builder/dateaccessioned.pl
 
 function Focus$function_name(event) {
@@ -53,7 +48,6 @@ function set_to_today( id, force ) {
         \$("#" + id).val("$date");
     }
 }
-//]]>
 </script>
 END_OF_JS
     return $res;