[RM-31917]: <NALT Koha> Update ลิงก์จากระบบ PRT มาแทนที่ลิงก์ของ LIRT ใน Tag 856$u

Viewed 4

Problem Summary

From Redmine:
เนื่องจากระบบ LIRT ปิดไปแล้ว และมีการใช้ลิงก์ LIRT ในระบบ Koha อยู่ เลยต้อง update เป็นลิงก์จากระบบ PRT แทน

ขั้นตอนการทำ แล้วแต่แจ็ค

ขั้นตอนที่พี่คิด

  1. (คุณนิ่มขอ) ทำรายงาน รายการ items ของ Koha ที่มีการลงรายการ Tag 856 หลังจากวันที่ 10 มีนาคม 2566 ถึงปัจจุบัน
  2. ก่อน replace ให้ export ข้อมูลปัจจุบัน (ที่เป็น LIRT) มาเก็บไว้ก่อน - ขอเก็บเป็น marc ด้วยน้า
  3. replace ลิงก์ของ LIRT ด้วยลิงก์ item ของ PRT
  4. ทดสอบว่าลิงก์จาก koha ไป PRT ถูกต้องไหม
  5. ทำรายงาน compare ลิงก์สองระบบ เมื่อ replace เรียบร้อยแล้ว

Root Cause Analysis

1 Answers

Solution / Workaround

cd /srv/punsarn/starkcode/customers/nalt/dspace/redirect-lirt
python convert.py input.csv > output.txt

Example output RewriteRule ^/handle/20.500.13072/618389 https://hdl.handle.net/20.500.14156/2002686 [R=301,L]

Include this file in apache config

Verification Steps

Open Excel/CSV and try to test any LIRT url (dl.parliament.go.th/handle/...)
Example

  1. Click or copy to browser https://dl.parliament.go.th/handle/20.500.13072/618389
  2. It should redirect to handle.net/20.500.14156/2002686
  3. Which is Item ff28483b-a196-4e07-8f19-1d6772e6a7d0