[Koha-bugs] [Bug 35287] Add additional fields support to ERM Licenses

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 9 18:18:12 CET 2024


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

--- Comment #23 from Pedro Amorim <pedro.amorim at ptfs-europe.com> ---
(In reply to Martin Renvoize from comment #22)
> Comment on attachment 159639 [details] [review]
> Bug 35287: REST API - Add additional fields support to ERM Licenses
> 
> Review of attachment 159639 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: Koha/REST/V1/ERM/Licenses.pm
> @@ +183,5 @@
> >                  $license->user_roles($user_roles);
> >                  $license->documents($documents);
> >  
> > +                my @extended_attributes = map { {'id' => $_->{field_id}, 'value' => $_->{value}} } @{$extended_attributes};
> > +                $license->extended_attributes( \@extended_attributes );
> 
> Won't you need to check here that @extended_attributes is indeed populated..
> else you may wipe them away without meaning to?

Good point. It's working like that by design. The scenario of wiping additional
attributes without meaning to should not be possible through the Koha form, as
existing data is always pre-populated on the form when editing.

Having said that, it is still possible with a third-party request to the REST
API but I believe that to be a wider topic. I've opened bug 35747 where I
provide a test plan to discuss it.

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


More information about the Koha-bugs mailing list