<field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
<field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
<field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
+ <field reporter:label="Hold Canceling Staff" name="canceled_by" reporter:datatype="link"/>
+ <field reporter:label="Hold Canceling Workstation" name="canceling_ws" reporter:datatype="link"/>
<field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
<field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
<field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
<link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
<link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
<link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
+ <link field="canceled_by" reltype="might_have" key="id" map="" class="au"/>
+ <link field="canceling_ws" reltype="might_have" key="id" map="" class="aws"/>
<link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
<link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
<link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
$hold->cancel_time('now');
$hold->cancel_cause($cause);
$hold->cancel_note($note);
+ $hold->canceled_by($e->requestor->id);
+ $hold->canceling_ws($e->requestor->wsid);
$e->update_action_hold_request($hold)
or return $e->die_event;
__PACKAGE__->columns(Primary => 'id');
__PACKAGE__->columns(Essential => qw/request_time capture_time fulfillment_time
prev_check_time expire_time requestor usr cancel_cause
- hold_type holdable_formats target cancel_time shelf_time
+ hold_type holdable_formats target cancel_time canceled_by canceling_ws shelf_time
phone_notify email_notify sms_notify sms_carrier selection_depth cancel_note
pickup_lib current_copy request_lib frozen thaw_date mint_condition
fulfillment_staff fulfillment_lib selection_ou cut_in_line
cancel_time TIMESTAMP WITH TIME ZONE,
cancel_cause INT REFERENCES action.hold_request_cancel_cause (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
cancel_note TEXT,
+ canceled_by INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
+ canceling_ws INT REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED,
target BIGINT NOT NULL, -- see hold_type
current_copy BIGINT, -- REFERENCES asset.copy (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED, -- XXX could be an serial.unit now...
fulfillment_staff INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
--- /dev/null
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE action.hold_request
+ADD COLUMN canceled_by INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
+ADD COLUMN canceling_ws INT REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED;
+
+CREATE INDEX hold_request_canceled_by_idx ON action.hold_request (canceled_by);
+CREATE INDEX hold_request_canceling_ws_idx ON action.hold_request (canceling_ws);
+
+COMMIT;
+