Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
dev:proposal:patron_statistical_categories [2011/11/16 23:42] – [Objects Affected] sprater | dev:proposal:patron_statistical_categories [2012/03/21 02:37] – [Objects Affected] sprater |
---|
| |
* In the Statistical Categories editor, the System Administrator must be able to optionally specify a patron statistical category as required when then statistical category is created or edited. This is currently possible for copy statistical categories, but not for patron statistical categories. | * In the Statistical Categories editor, the System Administrator must be able to optionally specify a patron statistical category as required when then statistical category is created or edited. This is currently possible for copy statistical categories, but not for patron statistical categories. |
* In the Statistical Categories editor, the System Administrator must be able to optionally mark one and only one entry for the statistical category as the default entry. | * In the Statistical Categories editor, the System Administrator must be able to optionally mark one and only one entry for the statistical category as the default entry for a given organizational unit. |
| |
=== Patron Registration Screen === | === Patron Registration Screen === |
| |
===== Objects Affected ===== | ===== Objects Affected ===== |
| |
| All modified files are available at [[https://github.com/sprater/Evergreen/tree/patstatcat|https://github.com/sprater/Evergreen/tree/patstatcat]]. |
| |
| Comparisons: [[https://github.com/sprater/Evergreen/compare/patstatcat|https://github.com/sprater/Evergreen/compare/patstatcat]] |
| |
**Database TABLE ''actor.stat_cat''** | **Database TABLE ''actor.stat_cat''** |
| |
id SERIAL PRIMARY KEY, | id SERIAL PRIMARY KEY, |
stat_cat_entry INT NOT NULL references actor.stat_cat_entry, | stat_cat_entry INT NOT NULL REFERENCES actor.stat_cat_entry(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, |
stat_cat INT NOT NULL references actor.stat_cat, | stat_cat INT NOT NULL REFERENCES actor.stat_cat(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, |
org_unit INT NOT NULL references actor.org_unit, | owner INT NOT NULL REFERENCES actor.org_unit(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, |
CONSTRAINT sced_once_per_org_unit UNIQUE (stat_cat,org_unit) | CONSTRAINT sced_once_per_owner UNIQUE (stat_cat,owner) |
| |
| See [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/src/sql/Pg/005.schema.actors.sql|005.schema.actors.sql]] and [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/src/sql/Pg/950.data.seed-values.sql|950.data.seed-values.sql]]. |
**Statistical category editor** | **Statistical category editor** |
''\openils\var\web\xul\rel_2_0_1\server\admin\stat_cat_editor.xhtml, stat_cat_editor.js, \openils\conf\fm_IDL.xml, OpenILS\Application\Storage\CDBI\actor.pm'' | |
* Add code to manage the new fields in **actor.stat_cat** and the new table **actor.stat_cat_entry_default**. | * Add code to manage the new fields in **actor.stat_cat** and the new table **actor.stat_cat_entry_default**. |
| See |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/examples/fm_IDL.xml|Open-ILS/examples/fm_IDL.xml]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/src/extras/ils_events.xml|Open-ILS/src/extras/ils_events.xml]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm|Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/StatCat.pm|Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/StatCat.pm]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm|Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm|Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm|Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm|Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/web/opac/locale/en-US/lang.dtd|Open-ILS/web/opac/locale/en-US/lang.dtd]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml|Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml]] |
| * [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js|Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js]] |
| |
**Patron registration** | **Patron registration** |
''\openils\var\web\xul\rel_2_0_1\server\patron\ue.xhtml, user_edit.xhtml, info_cat_cats.xul'' | * Read values for ''actor.stat_cat.required'', ''actor.stat_cat.allow_user_entered_values'', and ''actor.stat_cat_entry_default''. |
* Read values for ''actor.stat_cat.required'' and ''actor.stat_cat.allow_user_entered_values'', <html><span style="color:red;">default value field</span></html>. | |
* Add validation for required statistical categories. | * Add validation for required statistical categories. |
* Disable user entered values in statistical category if not allowed. | * Disable user entered values in statistical category if not allowed. |
* If a default entry is specified, mark it as selected by default. | * If a default entry is specified for the org unit and statistical category, mark it as selected by default. |
| |
| See [[https://github.com/sprater/Evergreen/blob/patstatcat/Open-ILS/web/js/ui/default/actor/user/register.js|Open-ILS/web/js/ui/default/actor/user/register.js]] |
===== Tests ===== | ===== Tests ===== |
| |