Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upUpdate Old Bailey Online.js #1760
Conversation
sharonhoward
and others
added some commits
Oct 8, 2018
adam3smith
reviewed
Oct 8, 2018
Old Bailey Online.js
Outdated
"items": [ | ||
{ | ||
"itemType": "case", | ||
"caseName": ".", |
This comment has been minimized.
This comment has been minimized.
adam3smith
Oct 8, 2018
Collaborator
That doesn't seem right/helpful as data import. I think what I would do is strip all trailing periods and commas, and then set newItem.title = [no title]
when there's nothing left -- does that sound right?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@sharonhoward -- could you take a look what you think about my changes? Looks good to me, but I don't use the database. |
zuphilip
reviewed
Nov 10, 2018
Old Bailey Online.js
Outdated
|
||
if (newItem.itemType == "case" && newItem.title && newItem.title == newItem.title.toUpperCase()) { | ||
if (newItem.itemType == "case" && trialTitle && trialTitle == trialTitle.toUpperCase()) { |
This comment has been minimized.
This comment has been minimized.
zuphilip
Nov 10, 2018
Collaborator
I suggest to split this further up, because maybe also trialTitle
for a case
might exitsts which is not all uppercase:
if (newItem.itemType == "case" && trialTitle) {
if (trialTitle == trialTitle.toUpperCase()) {
newItem.title = ZU.capitalizeTitle(trialTitle, true);
} else {
newItem.title = trialTitle;
}
}
zuphilip
merged commit cf1f2a4
into
zotero:master
Nov 12, 2018
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
This comment has been minimized.
This comment has been minimized.
Thank you both for the work here! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
sharonhoward commentedOct 8, 2018
Fixed function