tslittle / tiffanymaster

0 stars 0 forks source link

LP_pending: Acq call numbers do not use YAOUS default classification scheme #93

Open tslittle opened 2 years ago

tslittle commented 2 years ago

This needs to be verified against master.

tslittle commented 2 years ago

It looks like it's because in Cat.pm, find_or_create_volume is how it's created, which is called from Order.pm without a label_class attribute.

Here's find_or_create_volume sub find_or_create_volume { 1593 my( $self, $conn, $auth, $label, $record_id, $org_id, $prefix, $suffix, $label_class ) = @_; 1594 my $e = new_editor(authtoken=>$auth, xact=>1); 1595 return $e->die_event unless $e->checkauth; 1596 my ($vol, $evt, $exists) = 1597 OpenILS::Application::Cat::AssetCommon->find_or_create_volume($e, $label, $record_id, $org_id, $prefix, $suffix, $label_class); 1598 return $evt if $evt; 1599 $e->rollback if $exists; 1600 $e->commit if $vol; 1601 return { 'acn_id' => $vol->id, 'existed' => $exists }; 1602 }

And this is how it's being called in Order.pm

sub create_volume { 1310 my($mgr, $li, $lid) = @_; 1311 1312 my ($volume, $evt) = 1313 OpenILS::Application::Cat::AssetCommon->find_or_create_volume( 1314 $mgr->editor, 1315 $lid->cn_label, 1316 $li->eg_bib_id, 1317 $lid->owning_lib 1318 ); 1319 1320 if($evt) { 1321 $mgr->editor->event($evt); 1322 return 0; 1323 } 1324 1325 return $volume;

Here's something in Cat.pm to figure out how the YAOUS is being called: if (!$class) { 543 my $ctx_org = $ctx_org_id || $bre->owner || $U->get_org_tree->id; # root org 544 $class = $U->ou_ancestor_setting_value( 545 $ctx_org, 'cat.default_classification_scheme', $e);