Issue Number | 778 |
---|---|
Summary | Publication month search doesn't work as advertised |
Created | 2023-05-12 09:38:17 |
Issue Type | Bug |
Submitted By | Kline, Bob (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2023-07-13 16:25:30 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/oceebms/issue.345690 |
This is either a bug in my documentation or in my code, and we need to decide which and fix it. According to the user manuals, a search can ask for articles published in a given month without specifying the year of publication and all the articles published in that month and meeting the other search criteria will be included in the results set. However, the code in production ignores the month date when the year date is not specified (I discovered this as I was writing the automated tests for the board member search page). Looking at the code for the Drupal 7 system, I see that this behavior was copied from that version (though the search form didn't prevent the user from selecting a month without specifying a year, and the user manual says pretty much the same thing the current user manual says, implying that searching by month of publication without specifying a year should produce a results set consisting solely of articles published in that month).
So my question to you, ~vshields and ~juther, is: which behavior do you prefer for
this field? I'd rather not preserve the original behavior so completely
that the user thinks searching by publication month alone will work when
it won't, and there's no performance or other technical impediment to
supporting this type of search (though I concede that use cases for it
would arise infrequently at best). For the moment I have modified the
code in the glacier
branch so that the automated tests
(which conform to what the documentation says will happen) pass.
Please let me know your preference.
Added watchers.
Search works on DEV now as documented.
Robin decided to have the software block search for publication month without specifying the year of publication. Change installed on DEV. We will update the help pages when this lands on PROD.
Hi Bob, this looks good on DEV but we thought it might be helpful to add some explanatory text beneath the field. We like the wording in the error message that pops up when you try to input a month without a year, so maybe we could use the same text on the search form itself: "Publication year is required when a publication month is specified."
Marking fields as inline tells Drupal to do the same for the documentation string (there's no mechanism for saying to Drupal "here's a documentation string, but it doesn't really belong to a single field, can you instead display it below this group of fields?" OK to have it to the side? Or would you rather we put the Month and Year on their own lines? The "on the side" solution is on DEV.
Verified on DEV.
Verified on QA.
Verified on PROD.
Elapsed: 0:00:00.000631