Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero counts for articles in month dates #3714 #2312

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions doajtest/testbook/public_site/ToC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,18 @@ tests:
results:
- On the ToC of the journal with discontinued date in the past or today - the discontinued date is displayed
- On the ToC of the journal with discontinued date in the future - the discontinued date is not displayed
- title: Test articles journal's page
context:
role: anonymous
steps:
- step: To prepare for this test, ensure that a journal is publicly available in DOAJ, containing a minimum of 4 articles, with 2 from one month and 2 from another, and these months must not be consecutive (e.g. 2 articles from January and 2 from March).
- step: Search for the above journal
results:
- On the "Articles" tab in the ToC of the journal, the articles are displayed.
- On the left, the "Month" facet is displayed.
- step: Select one of the months from the list
results:
- On the "Articles" tab in the ToC of the journal, the articles from the selected month are displayed.
- On the left, the "Month" facet is displayed.
amdomanska marked this conversation as resolved.
Show resolved Hide resolved
- The selected month is displayed as selected in the "Month" facet.

5 changes: 3 additions & 2 deletions portality/static/js/edges/public.toc.edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $.extend(true, doaj, {
interval: "month",
display: "Month",
deactivateThreshold: 1,
active: false,
active: true,
displayFormatter : function(val) {
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var mi = (new Date(parseInt(val))).getUTCMonth();
Expand All @@ -120,7 +120,8 @@ $.extend(true, doaj, {
open: false,
togglable: true,
countFormat: countFormat,
hideInactive: true
hideInactive: true,
hideEmpty: true
})
}),

Expand Down