]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Org unit prox adjustment tweaks
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 14 Mar 2013 17:58:47 +0000 (13:58 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 27 Mar 2013 19:48:41 +0000 (15:48 -0400)
commitbd8e8002cdb6c0c9ee15f88120ef021e9bf8f3aa
tree2850236bee5923b3d012ddde11e06f25c5cbe375
parentf5a9d766097b939cc64b3338d5153fb47503be4b
Org unit prox adjustment tweaks

1) UI change - pre-select highest OU where user can edit

There's a dropdown in the org unit proximity adjustment interface that
affects the scope of what you can see in the table below.  Before, that
dropdown would be set to the user's home UO (say, BR1 in the example org
tree).  But you might have the permission to make changes everywhere, so
you add a proximity adjustment that affects BR3 in some way.  As soon as
you'd refresh the interface, your new proximity adjustment would not be
visible, because your scope selector would default to BR1.

So now the dropdown defaults to the first context where you have the
permission, which in all but eccentric setups should be the highest OU
(and therefore broadest scope) where you have the permission.

This could also improve other interfaces in the future.  Anything that
invokes openils.User.buildPermOrgSelector() can pass -1 as the third
parameter to get the new behavior.

2) Change UNIQUE index at DB layer.

This prevents the creation of rows that would give the hold targeter
conflicting directives.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/005.schema.actors.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.aoupa-unique-constraint.sql [new file with mode: 0644]
Open-ILS/src/templates/conify/global/config/org_unit_proximity_adjustment.tt2
Open-ILS/web/js/dojo/openils/User.js