<field reporter:label="OPAC/Staff Client User Name" name="usrname" reporter:datatype="text"/>
<field reporter:label="OPAC/Staff Client Holds Alias" name="alias" reporter:datatype="text"/>
<field reporter:label="Juvenile" name="juvenile" reporter:datatype="bool"/>
+ <field reporter:label="Record Last Update Date" name="last_update_date" reporter:datatype="timestamp"/>
<field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
<field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
alert_message TEXT,
create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
expire_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (now() + '3 years'::INTERVAL),
- claims_never_checked_out_count INT NOT NULL DEFAULT 0
+ claims_never_checked_out_count INT NOT NULL DEFAULT 0,
+ last_update_date TIMESTAMP WITH TIME ZONE
);
COMMENT ON TABLE actor.usr IS $$
User objects
END;
$$ LANGUAGE PLPGSQL;
+CREATE OR REPLACE FUNCTION actor.au_updated()
+RETURNS TRIGGER AS $$
+BEGIN
+ NEW.last_update_date := now();
+ RETURN NEW;
+END;
+$$ LANGUAGE plpgsql;
+
+CREATE TRIGGER au_update_trig
+ BEFORE UPDATE ON actor.usr
+ FOR EACH ROW EXECUTE PROCEDURE actor.au_updated();
+
CREATE TRIGGER actor_crypt_pw_update_trigger
BEFORE UPDATE ON actor.usr FOR EACH ROW
EXECUTE PROCEDURE actor.crypt_pw_update ();
staff.au_claims_returned_count_label=Returns Claimed
staff.au_create_date_label=Created On
staff.au_expire_date_label=Expires On
+staff.au_last_update_date_label=Updated On
staff.au_home_library_label=Home Library
staff.au_home_library_fullname_label=Home Library (Full Name)
staff.au_credit_forward_balance_label=Credit
staff.patron.display.render_search_form.patron_search=Patron Search
staff.patron.display.tab_name=Patron:
staff.patron.display.no_alerts_or_messages=No Alerts, Blocks, or Messages
-# Field 1 = actor.usr.id, Field 2 = actor.usr.create_date
-staff.patron.display.db_data=Database ID: %1$s Create Date: %2$s
+# Field 1 = actor.usr.id, Field 2 = actor.usr.create_date, Field 3 = actor.usr.last_update_date
+staff.patron.display.db_data=Database ID: %1$s Create Date: %2$s Last Updated: %3$s
staff.patron.hold_notices.tooltiptext=ID: %1$s Hold ID: %2$s Notifying Staff ID: %3$s
staff.patron.hold_notices.new_notification_record=New Notification Record
staff.patron.hold_notices.method=Method
'staff.patron.display.db_data',
[
obj.patron.id(),
- obj.patron.create_date()
+ obj.patron.create_date(),
+ obj.patron.last_update_date()
+ ? obj.patron.last_update_date()
+ : ''
]
);
e.setAttribute('tooltiptext',tooltiptext);
,'sort_value' : function(my) { return util.date.db_date2Date( my.au.create_date() ).getTime(); }
},
{
+ 'persist' : 'hidden width ordinal', 'id' : 'au_last_update_date', 'label' : commonStrings.getString('staff.au_last_update_date_label'), 'flex' : 1,
+ 'sort_type' : 'date',
+ 'primary' : false, 'hidden' : true, 'editable' : false, 'render' : function(my) { return util.date.formatted_date( my.au.last_update_date(), "%{localized}" ); }
+ ,'sort_value' : function(my) { return util.date.db_date2Date( my.au.last_update_date() ).getTime(); }
+ },
+
+ {
'persist' : 'hidden width ordinal', 'id' : 'expire_date', 'label' : commonStrings.getString('staff.au_expire_date_label'), 'flex' : 1,
'sort_type' : 'date',
'primary' : false, 'hidden' : true, 'editable' : false, 'render' : function(my) { return util.date.formatted_date( my.au.expire_date(), "%{localized_date}" ); }