Feature #10733

Add basic support for virtual institutions - ability to limit scope of search/browse to a single institution and maintain state

Added by Dan Gillean over 3 years ago. Updated almost 3 years ago.

Status:VerifiedStart date:12/19/2016
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Multi-institutionEstimated time:50.00 hours
Target version:Release 2.4.0
Google Code Legacy ID: Tested version:
Sponsored:Yes Requires documentation:

Description

This feature comes out of long discussions with developers at the University of Saskatchewan, captured on AtoM wishlist ticket #5968. The work here does not comprise all the features discussed in that wishlist ticket and its related tickets (see for example #6166, #6167, and #6876), but it introduces the basics upon which future functionality will be built.

Essentially, this feature will add an optional setting that an administrator can enable which, when turned on, will provide users with more ways to maintain state and continue searching/browsing within a single institution's holdings while operating in a multi-repository environment. The initial work has been submitted as a community pull request from UofS, with code review and some enhancements added by Artefactual. Examples of features included (may not be comprehensive):

  • Add General Settings page item to 'Enable Institutional Scoping'. When set to 'Yes', the Virtual institution features will take effect. When set to 'No', there will be no change to AtoM's current functionality.
  • When this setting is on, users can be "scoped" to an institution. When scoped, the theme for the institution will be used to highlight to the user that they are currently searching within that particular institution - for example, the background color, logo, and dedicated search box and browse menu for the institution (the "institutional block") will be present on search/browse pages that are scoped, to better indicate how the search results are limited. Searching in the dedicated search box will only return results from that particular institution.
  • Currently the only item in the Institutional block's browse menu is "Archival Descriptions" as this was the only object type that was able to facet by institution currently. As with the search field in this block, browsing from this menu will limit results to the currently scoped institution. Future development will hopefully extend this menu, so that other entities can be limited/scoped to a particular institution.
  • Users will be scoped to an institution if a browse or search by institution/repo is performed. Users will return to being globally scoped if they do a global search, or global browse, click on the site logo, or remove the institutional facet from search results.
  • The "search our collection" and "browse our collection" labels in the institutional block are also made configurable.

Future development may extend the current functionality further - see the related tickets listed at the top of this description for some ideas of how this might be further expanded.

Some initial wireframes, provided by the University of Saskatchewan, are attached. For earlier drafts, see the original wishlist ticket, #5968.

browse results.png (141 KB) Dan Gillean, 01/05/2017 03:16 PM

description view page.png (144 KB) Dan Gillean, 01/05/2017 03:16 PM

repository page.png (128 KB) Dan Gillean, 01/05/2017 03:16 PM

browsing arch descr scoped to repo.png (118 KB) Steve Breker, 01/07/2017 02:37 PM

browse arch descr unscoped.png (232 KB) Steve Breker, 01/07/2017 02:37 PM

Global Settings.png (23.2 KB) Steve Breker, 01/07/2017 02:37 PM

Inst Block.png (240 KB) Steve Breker, 01/07/2017 02:37 PM

arch descr scoped to repo.png (287 KB) Steve Breker, 01/07/2017 02:39 PM


Related issues

Related to AtoM Wishlist - Feature #5968: virtual institutional database - limit search/browse to s... New 11/13/2013

History

#2 Updated by Dan Gillean over 3 years ago

  • Related to Feature #5968: virtual institutional database - limit search/browse to single institution and maintain state added

#4 Updated by Steve Breker over 3 years ago

Work is ready for code review. Pull Request is split into 10 commits in effort to split this large change into logical pieces.

https://github.com/artefactual/atom/pull/492

Screen shots attached.

#5 Updated by Nick Wilkinson over 3 years ago

  • Assignee changed from Nick Wilkinson to Mike Gale

Hi Mike, assigning to you for CR.

#6 Updated by Mike Gale over 3 years ago

  • Assignee changed from Mike Gale to Steve Breker

Looks pretty good code-wise (a couple weird things but I guess they were unavoidable, like the dynamic CSS), I had a few suggestions. There are a ton of changes in here though, so I suspect QA will uncover something.

#7 Updated by Steve Breker over 3 years ago

  • Assignee changed from Steve Breker to Mike Gale

CR recommendations addressed. I have pushed a new commit.

https://github.com/artefactual/atom/pull/492

#8 Updated by Mike Gale over 3 years ago

  • Assignee changed from Mike Gale to Steve Breker

lgtm

#9 Updated by Steve Breker over 3 years ago

Pushed to qa/2.4.x. Ready for QA.

Commit note:

@ Institutional Scoping enhancement, Refs #10733

Institutional Scoping enhancement for AtoM. When activated, the feature
will allow users to be scoped to a specific repository such that browsing
and searching will restict a user to a specific repository. Repository
theming will apply to pages when scoped to give the user visual cues
indicating they are browsing with a repository. A new search block will
be present on the left hand side from which browse and search will be done.
The User attribute 'search-realm' is used to maintain user context when a
user is or is not scoped to a particular institution. The search-realm
will be set to a repo id when scoped, and will not be set when the user
is globally scoped.
Changes include:
- migration 149 to set up new settings and menu items
- settings and menu item config in menus.yml and settings.yml
- Global Settings page change to add new option to "Enable insitutional
scoping"
- new browse menu component which provides the ability to configure custom
menu items separately from the standard browse menu. Also provides different
text labelling than the standard browse component.
- new holdings component which uses the new browse institution component.
This component is the 'Institutional Block' and is present when institutional
scoping is turned on, and the user is currently scoped to an institution (not
browsing globally). Provides search of information objects within the scoped
repository.
- Top main search box will always search the database globally when this
feature is ON
Supporting technical changes:
- in QubitMenu created a new alias called currentRealm which will contain
the current repository search context. This is used by menu items on the
Institutional Block as part of the enable_institutional_scoping feature. The
alias will be populated with search-realm if available, else it will try to
use resource->id from sf_route, else try repos param from request.
- added the method removeAttribute() to the myUser class.
Repository theming:
This enhancement includes two new stylesheet components. Both components will
trigger the background theme for the repository they are part of when the
Institutional Scoping feature is turned on and the user is scoped to a repo.
The application of the Repository theme to these pages is intended to give
visual cues to the user that they are currently scoped to an institution.
These two components differ in their logic to detect when the repository
page style should be applied. Repositories always have the stylesheet applied;
the info obj module should only have it applied if the Institutional Scoping
feature is turned on, and the Achival Description plugin modules have
different display logic for the stylesheet depending on whether the Inst
Scoping feature is turned on or off.
- The information object module component will trigger the theme when the
institutional scoping setting is turned on and the search-realm is set.
This is new behaviour for the information object module and is strictly
dependent on the Institutional scoping feature being turned on.
- The sfIsadPlugin component will first look at the institutional scoping
setting and examine the search-realm for a repo. If institutional scoping
setting is off, it will fall back to the original behaviour for the Archival
Descr plugin modules: try to determine the repo from the sf_route and display
the repo stylesheet if found. This component replaces the use of the repository
stylesheet component in the Archival Description plugin modules and
incorporates new logic for the inst scoping feature.
The following plugins will use the new sfIsadPlugin component:
- arDacsPlugin
- sfDcPlugin
- sfModsPlugin
- sfRadPlugin@

#10 Updated by Steve Breker over 3 years ago

  • Status changed from Code Review to QA/Review
  • Assignee changed from Steve Breker to Nick Wilkinson

Steve Breker wrote:

Pushed to qa/2.4.x. Ready for QA.

Commit note:

@ Institutional Scoping enhancement, Refs #10733

Institutional Scoping enhancement for AtoM. When activated, the feature
will allow users to be scoped to a specific repository such that browsing
and searching will restict a user to a specific repository. Repository
theming will apply to pages when scoped to give the user visual cues
indicating they are browsing with a repository. A new search block will
be present on the left hand side from which browse and search will be done.

The User attribute 'search-realm' is used to maintain user context when a
user is or is not scoped to a particular institution. The search-realm
will be set to a repo id when scoped, and will not be set when the user
is globally scoped.

Changes include:

- migration 149 to set up new settings and menu items
- settings and menu item config in menus.yml and settings.yml
- Global Settings page change to add new option to "Enable insitutional
scoping"
- new browse menu component which provides the ability to configure custom
menu items separately from the standard browse menu. Also provides different
text labelling than the standard browse component.
- new holdings component which uses the new browse institution component.
This component is the 'Institutional Block' and is present when institutional
scoping is turned on, and the user is currently scoped to an institution (not
browsing globally). Provides search of information objects within the scoped
repository.
- Top main search box will always search the database globally when this
feature is ON

Supporting technical changes:

- in QubitMenu created a new alias called currentRealm which will contain
the current repository search context. This is used by menu items on the
Institutional Block as part of the enable_institutional_scoping feature. The
alias will be populated with search-realm if available, else it will try to
use resource->id from sf_route, else try repos param from request.
- added the method removeAttribute() to the myUser class.

Repository theming:

This enhancement includes two new stylesheet components. Both components will
trigger the background theme for the repository they are part of when the
Institutional Scoping feature is turned on and the user is scoped to a repo.

The application of the Repository theme to these pages is intended to give
visual cues to the user that they are currently scoped to an institution.

These two components differ in their logic to detect when the repository
page style should be applied. Repositories always have the stylesheet applied;
the info obj module should only have it applied if the Institutional Scoping
feature is turned on, and the Achival Description plugin modules have
different display logic for the stylesheet depending on whether the Inst
Scoping feature is turned on or off.

- The information object module component will trigger the theme when the
institutional scoping setting is turned on and the search-realm is set.
This is new behaviour for the information object module and is strictly
dependent on the Institutional scoping feature being turned on.
- The sfIsadPlugin component will first look at the institutional scoping
setting and examine the search-realm for a repo. If institutional scoping
setting is off, it will fall back to the original behaviour for the Archival
Descr plugin modules: try to determine the repo from the sf_route and display
the repo stylesheet if found. This component replaces the use of the repository
stylesheet component in the Archival Description plugin modules and
incorporates new logic for the inst scoping feature.

The following plugins will use the new sfIsadPlugin component:
- arDacsPlugin
- sfDcPlugin
- sfModsPlugin
- sfRadPlugin@

#11 Updated by Nick Wilkinson over 3 years ago

  • Assignee changed from Nick Wilkinson to Dan Gillean

#12 Updated by Steve Breker over 3 years ago

New PR for the work described in ticket 10696.

https://github.com/artefactual/atom/pull/498

#13 Updated by Steve Breker over 3 years ago

MikeG gave the thumbs up on 10696 on PR

https://github.com/artefactual/atom/pull/498

10696 is merged and ready for QA.

Net effect of this change is that the repository holdings list and pager in the sidebar will be available below the Institutional Block on the repository detail page when Institutional Scoping is ON. It had always displayed on this screen when Institutional Scoping was turned OFF.

#14 Updated by Steve Breker over 3 years ago

The issue Dan reported where the Archival Description detail page was not reflecting the currently scoped institution's theme has been fixed.

To replicate the issue Dan was experiencing:
- browse repositories
- select a repo, taking you to the repository detail page - repo theme should be displayed on the repo detail page
- select an archival description from the new sidebar list component

Before this fix, the theming would not have been applied to the archival description detail page. Now that this fix is in place, the user should be scoped and the theming on the arch descr detail page should reflect the repository they are currently scoped to.

Ready for QA.

https://github.com/artefactual/atom/pull/500

#15 Updated by Steve Breker over 3 years ago

When Insitutional Scoping is OFF and a user performs a search that returns zero results, the information object browse template changes to a 1 col layout removing the sidebar. I have coded a change that creates an exception for that rule so that when Institutional Scoping is ON, the 2 column layout will be used and the sidebar including the Institutional Block will be displayed, which will provide context to the user and allow the user to perform another scoped search.

PR here:

https://github.com/artefactual/atom/pull/501

#16 Updated by Steve Breker over 3 years ago

CR for PR 501 approved by MikeG.

Merged.

#17 Updated by Dan Gillean over 3 years ago

  • Status changed from QA/Review to Verified

Looks good!

#18 Updated by Steve Breker over 3 years ago

Bumped version in data/fixtures/settings.yml. PR code reviewed by Jesús.

Commit: Inst Scoping bump DB version, Refs #10733
Hash: f2363833b3f52c433dcf2eca84015e31f958ad23

This must be included with the USASK test deployment.

PR link: https://github.com/artefactual/atom/pull/503

#20 Updated by Steve Breker over 3 years ago

  • Status changed from Verified to Code Review
  • Assignee changed from Dan Gillean to Nick Wilkinson

Pull request for 10774 is here:

https://github.com/artefactual/atom/pull/504

This PR contains changes to ensure search term text is located in the correct search field depending on whether the user is scoped to an institution or not.

Ready for code review.

#21 Updated by Nick Wilkinson over 3 years ago

  • Assignee changed from Nick Wilkinson to Mike Gale

Hi Mike, assigning to you for CR.

#22 Updated by Jesús García Crespo over 3 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from Mike Gale to Jesús García Crespo

LGTM

#23 Updated by Jesús García Crespo over 3 years ago

  • Assignee changed from Jesús García Crespo to Steve Breker

#24 Updated by Steve Breker over 3 years ago

Notes on 10774 change from PR:

This change controls which search box will contain the searched-for text
after a page refresh when the Institutional Scoping feature is turned on.

When scoped to an insitution and an institutional search is performed
using the search field in the institutional block, retain the searched-for
text in this search field. Do not display this searched-for text in the
global search box in the header.

if a institutional search has been performed, and the repo facet is removed
from the results page removing scoping, copy the searched-for text to the
global search box in the header.

if a user performs a global search using the header search box and on the
results page the institutional facet is ADDED to the results causing the
session to scope to a repository, move the search term from the global
search box in the header to the Institutional Block search field.

Note that this feature only takes effect if Institutional Scoping feature is
ON.

#25 Updated by Steve Breker over 3 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Steve Breker to Nick Wilkinson

Merged PR 504, 10774.

Ready for QA.

#26 Updated by Nick Wilkinson over 3 years ago

  • Assignee changed from Nick Wilkinson to Dan Gillean

Hi Dan, passing back to you to either QA or Verify.

#27 Updated by Dan Gillean over 3 years ago

  • Status changed from QA/Review to Verified

#28 Updated by Dan Gillean almost 3 years ago

  • Assignee deleted (Dan Gillean)
  • Requires documentation deleted (Yes)

Also available in: Atom PDF