EBMS Tickets

Issue Number 65
Summary [General] Custom default settings for users
Created 2013-09-17 14:10:44
Issue Type Improvement
Submitted By Shields, Victoria (NIH/NCI) [E]
Assigned To alan
Status Closed
Resolved 2014-11-20 12:15:31
Resolution Fixed
Path /home/bkline/backups/jira/oceebms/issue.113378
Description

TIR #2493 entered 2013-04-02 by Victoria Shields (Future Release status)

While creating the EBMS, we talked about allowing users to have their own default settings (e.g., display options) on some pages. We'd like to discuss this and see if it will be possible in a future release.

Comment entered 2013-12-23 23:28:57 by Kline, Bob (NIH/NCI) [C]

This is certainly possible, but we'll need specific requirements.

Comment entered 2014-03-12 17:11:47 by Juthe, Robin (NIH/NCI) [E]

We would like to have user-specific default settings for the following items, if possible:

1. Queue pages - Board pre-selected (this is already done); Display options - sort by, format, and items per page
2. Import citations page - Board pre-selected
3. Search database page - Board pre-selected
4. Not List Maintenance page - Board pre-selected
5. Create packet page - Board pre-selected; sort of articles either by journal or by author's last name
6. All reports - Board pre-selected
7. Full citation page - User's Board section expanded

Comment entered 2014-03-12 17:33:36 by Juthe, Robin (NIH/NCI) [E]

One more:

8. Post document page - Board pre-selected

Comment entered 2014-03-13 14:36:33 by Kline, Bob (NIH/NCI) [C]

Only display options for the queue page and sorting of the articles on the packet creation page are candidates for control by a user preferences profile. The rest will be handled by logic which is driven by which boards the user is connected with. For those users associated with a single board, that board will be used as the default. Robin will come up with logic for the other users. We discussed but rejected the idea of having a user interface for toggling between the options for sorting the articles on the packet creation page.

Comment entered 2014-05-28 17:39:47 by Juthe, Robin (NIH/NCI) [E]

Could you please provide me with a list of the users who are associated with more than one Board? Then I can give you the specific logic for each one. Thanks.

Comment entered 2014-05-28 18:16:30 by Kline, Bob (NIH/NCI) [C]

Robin Baldwin (CAM & Supportive and Palliative Care)
Bonnie Ferguson (All)
Margaret Beckwith (All)
Tana Smith (CAM & Screening and Prevention)
Test Board Member (Adult Treatment & Genetics)
Test Admin Assistant (All)

Comment entered 2014-05-28 18:26:50 by Juthe, Robin (NIH/NCI) [E]

Thank you! Here's the logic for each one:

Robin Baldwin (CAM & Supportive and Palliative Care) - default to SPC
Bonnie Ferguson (All) - default to Adult
Margaret Beckwith (All) - default to Adult
Tana Smith (CAM & Screening and Prevention) - default to S&P
Test Board Member (Adult Treatment & Genetics) - default to Adult (although I don't think any of the options above will pertain to a Board member)
Test Admin Assistant (All) - default to Adult

Comment entered 2014-06-12 23:04:39 by alan

If I'm reading the previous comments correctly, especially Bob's comment
that only the display and sorting options for two pages are user
controlled profile items, there may be a pretty simple and yet very
functional way to implement a user interface for setting defaults.

For the queue related options there is a subform entitled "DISPLAY OPTIONS"
that allows a user to select a sort order, a format, and the number of
items per page.

I think all that we have to do to create a profile interface for this is to
add a single checkbox that offers to "Save as defaults".

The advantages of this are:

  • There's no requirement for a new menu entry or a separate place to go to
    view or set defaults.

  • The user would have to open this form anyway if she wished to change the
    way results are displayed.

  • There's no training required. It's simple and obvious what to do and
    where to find it.

  • It's tied to the values that are already on the page. There can't be
    any divergence between what's in the display options form and what's in
    the profile editing form. Changes in the software can't break the
    correspondence.

Looking at the Create Packets page, I didn't see any control widget to
allow user selectable sorting options for the articles, but if we allow
this to be profile controlled, I'd propose doing it the same way as I
proposed for for the queue display options, namely:

  • Create a pair of radio buttons offering to sort by author or by
    journal title.

  • Add a checkbox for "Save as default".

Comment entered 2014-06-12 23:11:52 by alan

Robin's last comment showing the logic for selecting a default board
seems to me to be consistent with a simple rule set for prioritizing
board selection.

  • Adult Treatment is always chosen first if it's one of the available
    boards.

  • CAM is always chosen last if it's one of the available boards.

We could elaborate this rule set by assigning intermediate priorities to the
others too. We may or may not want to bother with that at this time.

Is such a rule a good idea? Or do we need to store info with each user
who is associated with more than one board?

Comment entered 2014-06-18 09:18:41 by Juthe, Robin (NIH/NCI) [E]

I like the proposal to add a "save as defaults" option to the DISPLAY OPTIONS menu on the queue page, and to add radio buttons with a "save as default" selection on the packet page.

I think we may need to keep the Board preference tied to a personal user, although this logic makes sense most of the time. One exception is Sharon Quint-Kasner who reviews citations for the Adult Tx Board and the Peds Board but her "preferred" Board should be Peds.

Comment entered 2014-06-18 11:14:32 by alan

Okay.

In between bouts of battling the forest fire I'll implement the "save as defaults" solutions and try to come up with a useful approach for the user/board defaults.

Comment entered 2014-08-05 17:10:59 by alan
As the eight requirements are listed in the second and third
comment, these are my assumptions about interpreting them.

 a. There is only one default board for each user.

    The specifications in the March 12 comments seem a little
    ambiguous to me, but the comment for 18 Jun 2014 09:18 AM
    seems to imply that each user has one default board.

    I want to be sure that is what is wanted.

 b. Board defaults don't need to be set by the user herself.

    My reading of the comment on 28 May 2014 06:26 PM is that the
    board defaults are set by the site manager and don't need to
    be, and perhaps shouldn't be, changed by users.

    I'd probably make this an admin function.

 c. Default display options are settable for searching.

    Default display options are specified for the citation review
    queue page and the create packet page, but not for the search
    database page.

    I don't see a problem with that, but wanted to be sure that
    the display options weren't left out of the defaults by
    accident.  I suspect that this was an accident.

    Please let me know whether searching should have user
    settable default display options.
Comment entered 2014-08-05 17:35:20 by alan

I just spoke to Victoria in order to have a decision to work on tonight.

We agreed that all three of the above assumptions are correct. I will proceed on that basis.

Comment entered 2014-08-05 17:58:35 by alan

Item 7 in the requirements specs (12 Mar 2014 05:11 PM) says:

"7. Full citation page - User's Board section expanded"

I presume that means that, if the user checks the expand by default box, I should expand ALL four of the board specific items, i.e., Review Cycle, Import Process, Medical Librarian Initial Review, and Publishing.

I'm going to assume that's right. If it's wrong and only one section should be expanded, or if we need separate checkboxes for each section, please let me know.

I'll defer implementation of this until I get other things working.

Comment entered 2014-08-05 18:53:41 by alan

Victoria stopped by and said that she thought, subject to validation from Robin and other Board Managers, that it was just the review cycle that needs a check box to set a default default for expanding the editorial boards, and only the user's default board should be expanded.

I'll assume that's right unless and until I hear otherwise.

Comment entered 2014-08-06 13:57:20 by Shields, Victoria (NIH/NCI) [E]

At the EBMS meeting this morning, we agreed that we just want the editorial board section for the user's default editorial board expanded. The Import Process, Medical Librarian, and Publishing sections should remain closed (or at least, not expanded).

Comment entered 2014-08-27 00:03:09 by alan

I've completed most of the work on this task, including providing "save as default" display options for the review queue, and setting default editorial boards for all of the specified functions and all reports except for the two exotic "webform" ones - hotel requests and reimbursement requests.

I have not yet expanded the full citation user's board, set a "save as default" for search display options, or set the default editorial boards for the specific users who have more than one to deal with and the one they want doesn't come up with ordinary defaults.

But the end is in sight. Only the two webform reports still look baffling to me.

I'm reasonably confident that I can finish everything but the webform reports on Thursday. They might turn out to be easy but I haven't figured them out yet.

Comment entered 2014-08-28 20:30:24 by alan

I'm marking this resolved as fixed. All of the changes are on both Dev and QA. Default values for preferred editorial board have been set for as specified for the users mentioned in the comments.

Comment entered 2014-09-10 16:34:20 by Shields, Victoria (NIH/NCI) [E]

On the Create Packet page (see #5 of original request), the articles are sorting by author, but I thought there was going to be a button (or something) on that page to allow us to sort by journal as well. Is that setting saved somewhere else, or am I missing something?

Comment entered 2014-09-11 09:23:02 by alan

> I thought there was going to be a button (or something) on that
> page to allow us to sort by journal as well.

An oversight on my part. I'll look at it.

Comment entered 2014-09-11 23:58:53 by alan

I've got a version of this running on my own machine, but I'd like to fiddle with the behavior a bit before I install it on Dev or QA.

Comment entered 2014-09-12 16:04:24 by Shields, Victoria (NIH/NCI) [E]

While testing the Search Database page with the Board pre-selected (#3 above), we've realized that this is not ideal because we're not able to unselect the Board. It's now essentially a required field, which limits the searches too much. Can we reverse the pre-selection for this page?

Comment entered 2014-09-12 16:33:43 by Kline, Bob (NIH/NCI) [C]

I believe the standard UI for unselecting from a multi-list works the way you want it to on all browsers. Hold down the Control key (Command on a Mac) and click the selected board, which will remove the selection.

Comment entered 2014-09-12 16:44:54 by Shields, Victoria (NIH/NCI) [E]

OK, I've learned something new (and useful) today. However, I think we'd still rather not have anything selected for this particular page. I think more often than not, we'd end up having to unselect the Board because we'd usually just be looking for any trace of a citation and not want the search to be limited to our Board.

Comment entered 2014-09-16 14:34:51 by alan

I have installed the software and data changes to support the sort of articles part of requirement 5 on Dev and QA.

I'll take out the board pre-selection for searching next.

Comment entered 2014-09-16 14:58:15 by alan

I have removed the default setting for editorial board from the search form as per Victoria's request.

Comment entered 2014-09-16 14:59:19 by alan

I believe that everything is done for this issue and is installed on Dev and QA with all code in version control.

Comment entered 2014-09-16 15:59:36 by Shields, Victoria (NIH/NCI) [E]

For the Create Packet page, the additional sort (after author) is supposed to be by journal. It's currently sorting by article title. Sorry. :-(

Comment entered 2014-09-16 18:17:03 by alan

Sorry. Your instruction was pretty clear but sometimes I see what I expect to see instead of what is actually there.

Fixed on Dev and QA.

If you tested this function and saved "Article Title" as the default sort order, sorting won't work right for you until you set a new default - either "Author" or "Journal Title". If you don't do that the code will read the old default value and test for sorting by each of the expected sort orders. Not finding either of those, it will do no sorting.

Comment entered 2014-09-16 18:29:58 by Shields, Victoria (NIH/NCI) [E]

The sort by journal title is working perfectly! Thanks!

Comment entered 2014-09-18 15:21:13 by Juthe, Robin (NIH/NCI) [E]

I'm getting an AJAX error (see attached screenshot) on the queue page (as a Board manager) when I attempt to apply saved defaults under the display options menu.

Here is full text of the error message (the screenshot cuts it off I think).

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /system/ajax
StatusText: Service unavailable (with message)
ResponseText: PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'all' for column 'dft_cite_review_items_per_page_value' at row 1: INSERT INTO {field_data_dft_cite_review_items_per_page} (entity_type, entity_id, revision_id, bundle, delta, language, dft_cite_review_items_per_page_value) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array
(
[:db_insert_placeholder_0] => user
[:db_insert_placeholder_1] => 294
[:db_insert_placeholder_2] => 294
[:db_insert_placeholder_3] => user
[:db_insert_placeholder_4] => 0
[:db_insert_placeholder_5] => und
[:db_insert_placeholder_6] => all
)
in field_sql_storage_field_storage_write() (line 451 of /local/content/web/appdev/modules/field/modules/field_sql_storage/field_sql_storage.module).

Comment entered 2014-09-18 15:34:57 by alan

It looks like this is a problem in more than one place. The data type of the field is wrong, expecting a number instead of the string "all".

I'll fix it.

Comment entered 2014-09-18 20:48:19 by alan

I've installed the fixes on Dev and QA and in subversion.

The Dev database has been unreachable all evening so I did my testing on QA and on my own virtual machine. Hopefully, it's working on Dev too.

Comment entered 2014-09-19 15:38:13 by Juthe, Robin (NIH/NCI) [E]

Verified on QA. Thanks!

Comment entered 2014-11-03 11:43:07 by Juthe, Robin (NIH/NCI) [E]

Verified on prod, however, I'm making a few notes for a future release.

1. Two reports do not preselect the logged-in user's Board name. Add a new issue to preselect the appropriate Board on the Reimbursement and Hotel Request reports.

2. "View all" default setting causes problems on the queue page. See related issue OCEEBMS-255.

Comment entered 2014-11-05 15:40:39 by Juthe, Robin (NIH/NCI) [E]

Unfortunately, we just learned that Rick's queue is not defaulting to Adult Treatment anymore (it used to before this release). This is probably related to the custom default settings we established, so I'm reopening this ticket.

Comment entered 2014-11-06 11:47:58 by alan

That was probably a side effect of our switching to the new system of having a site manager set the default board for users that have more than one. We never set his default.

I edited his record on the Production server to set his default to board number 1 - the Adult Treatment Board. No software changes were required.

If he's logged in to the system now he may need to log out and back in again to see the change. Please let me know if it doesn't work.

Comment entered 2014-11-06 12:00:15 by Juthe, Robin (NIH/NCI) [E]

Great! We'll check with him. Thanks.

Comment entered 2014-11-20 12:15:31 by Juthe, Robin (NIH/NCI) [E]

Rick's queue is now defaulting to Adult, so that did the trick. Thanks, Alan! I'm closing this issue.

Attachments
File Name Posted User
screenshot-1.jpg 2014-09-18 15:21:13

Elapsed: 0:00:00.000766