Bug 11351 added the ability to select a media type for SIP responses, however it didn't set the related 'magnetic' bit for SIP. We could hard code that based on media type, but it would be cleaner to allow configuration at the item type level. I'll post two patches here.. the first we've been running in production for around a decade and I thought I'd posted it years ago but can't find it.. the second making it more flexible.
Created attachment 191552 [details] [review] Bug 41649: Set magnetic_media in SIP responses The `magnetic_media` flag was never set, it can be set from `sip_media_type` if it's present. `sip_media_type` is set via the Authorized Values system. Checkins will not be sorted correctly by Biblioteca without this flag.
Created attachment 191553 [details] [review] Bug 41649: Add sip_magnetic field to itemtypes table This patch adds the new sip_magnetic boolean flag field to the itemtypes table to allow flagging the itemtype as magnetic for sip responses.
Created attachment 191554 [details] [review] Bug 41649: DBIC Build Patch from commit 020392b
Created attachment 191555 [details] [review] Bug 41649: Add option to set magnetic flag for item itemtypes This patch adds the ability to set an item type as magentic for SIP response purposes. Test plan: 1) Run included database updates 2) Navigate to admin > itemtypes 3) Edit/Add an itemtype and scroll to the 'Sip media types' input 4) A new 'Sip magnetic' checkbox should be available 5) Confirm setting/unsetting it works as expected 6) The SIP magnetic flag bit should respect the setting
Created attachment 191556 [details] [review] Bug 41649: Unit tests for magnetic media Add unit tests for SIP magnetic media support. Test plan 1) Run t/db_dependent/SIP/Transaction.t in ktd and confirm it passes