Commit graph

1327 commits

Author SHA1 Message Date
Tom Najdek
91c385a67a Add option to Mendeley importer to relink items
New option only appears if importer version is < 1 or not present.
It will:
    * Skip fetching collections and attachments
    * Skip any new items
    * Update relations on existing items
2022-12-17 04:31:55 -05:00
Adomas Venčkauskas
3d8bbb3e55 Link Mendeley citations in documents to imported items. Closes #2622 2022-11-29 16:27:36 +02:00
Dan Stillman
f33cf1cde3 Don't show items with annotated attachments after moving to trash
https://forums.zotero.org/discussion/100775/deleted-items-keep-reappearing-in-my-library

Regression from 20c6fe67
2022-11-28 04:30:50 -05:00
Adomas Venčkauskas
2db90511f9 Import URL from XPCOM code instead of relying on window for Proxy code
Also fix other failing proxy tests. Closes #2928
2022-11-21 11:51:18 +02:00
Adomas Venčkauskas
8135895313 Fix proxy test 2022-11-21 11:28:52 +02:00
Dan Stillman
89bc094690 Fix response content type in Find Available PDF test 2022-11-16 18:35:31 -05:00
Dan Stillman
1a1c08890f Use clearer name for Find Available PDF tests 2022-11-16 18:35:31 -05:00
Dan Stillman
a48e0f2437 Handle relative PDF links when using custom PDF resolver 2022-11-16 18:35:31 -05:00
Tom Najdek
d131fe3dc9
Mendeley Import: Auth using direct login
* Importer will now ask user for a login and password via form and will perform sign-in directly
  using credentials rather than oauth
* Signing in this way enables importer to obtain desktop document ID which is now stored for each
  item
* It's possible to switch back to the old method (ouath) by setting `import.mendeleyUseOAuth` pref
  to `true`.
* New option to only import new items. This options only appears if database contains previously
  imported items.
* Importer will now update mendeleyDB:documentUUID on existing items to match value used in Mendeley
  Desktop if available
* Importer will no longer create collections when no new items are imported
* Importer will only report number of new items imported on re-import
* Importer will now preserve dateAdded on re-import

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2022-11-13 12:47:29 +01:00
Adomas Venčkauskas
378d8180e8 Adjust tests to not use the dotsToHyphens proxy option 2022-11-10 12:46:40 +02:00
Martynas Bagdonas
6bc1551f7f Increase wait time for pdf-reader iframe initialization in tests
This is necessary until a proper initialization promise is added to pdf-reader.
2022-10-31 18:03:42 +02:00
Dan Stillman
5cea183ae3 Avoid infinite/excessive loops in Find Available PDF
https://forums.zotero.org/discussion/100634/potential-infinite-loop-when-trying-to-find-available-pdf

Closes #2883
2022-10-30 04:53:09 -04:00
Dan Stillman
fe09afa0a6 Restore cell.csl for style tests
Removed in 4e1754b960
2022-10-26 05:14:47 -04:00
Dan Stillman
ab2bec936e Reset accidental change from 7fcc1d35 2022-10-26 04:38:19 -04:00
Adomas Venčkauskas
7db16843b3 Add an integration test for citation merging 2022-10-25 14:55:19 +03:00
Adomas Venčkauskas
a4eafd0307 Fix wrong given name disambiguation after editing author for citeproc-js
Closes #2870
2022-10-25 14:55:16 +03:00
Adomas Venčkauskas
4e1754b960 Change integration test citation style to APA and some refactoring 2022-10-25 14:55:16 +03:00
Dan Stillman
7fcc1d35a4 Reset note Quick Copy pref on upgrade if set to Markdown + Rich Text
The default JSON pref value used spaces, but changing the drop-down
resulted in a version without spaces, so simply changing the default to
include the new link options wouldn't change all existing installs and
the "Include App Links" checkbox wouldn't show as enabled for Markdown.
This adds a pref migration step to reset the pref to the new default if
it's set to Markdown + Rich Text, regardless of whitespace differences.
2022-10-22 16:41:48 -04:00
Dan Stillman
2b9e9c174f Don't match all attachments with annotations for "not" search conditions
Fixes #2867
2022-10-17 23:59:29 -04:00
Martynas Bagdonas
78eb857e73 Add annotation update test to pdf-reader tests 2022-10-11 18:07:03 +03:00
Martynas Bagdonas
7bada8ce0c Tweak pdf-reader annotation creation test 2022-10-10 17:09:30 +03:00
Martynas Bagdonas
af436d34a8 Add pdf-reader annotation creation test 2022-10-10 16:53:42 +03:00
Abe Jellinek
fb4f7b7932 Automatically relink attachments from LABD (#2374)
Fixes #2092
2022-10-08 02:29:31 -04:00
Tom Najdek
88217492f9
Map annotation colors colors on import #2819 (#2822) 2022-09-12 19:57:24 -04:00
Dan Stillman
66fccec6b4 Add "Create Note from Annotations" option to items list context menu
To allow creation of a standalone note with annotations from all the
selected top-level items and/or attachments. Annotations will be sorted
by the order of the items in the items list.

"Add Note from Annotations" remains when a single regular item or one or
more attachments under a single regular item are selected.
2022-09-05 10:37:07 -04:00
Dan Stillman
894309d061 Add collectionID option to EditorInstance.createNoteFromAnnotations()
For adding a standalone note to the current collection
2022-09-05 10:37:07 -04:00
Dan Stillman
b24c7577ec Rename Zotero.Items::keepParents() to keepTopLevel()
So that it works for more than two levels of items

Also fix a bug where the parent item could be returned more than once if
multiple child items were selected.
2022-09-05 10:37:07 -04:00
Dan Stillman
ca4ced1e9f Add Zotero.Item::topLevelItem and Zotero.Items.getTopLevel(items) 2022-09-05 10:37:07 -04:00
Martynas Bagdonas
6646be66d0 EditorInstance.createNoteFromAnnotations(): Handle multiple attachments 2022-09-05 10:37:07 -04:00
Dan Stillman
91ae576074 Fix HTTP.request() 5xx handling with errorDelayMax=0
This was causing delay-less infinite loops for OPTIONS requests to Box,
which are returning 502 errors.
2022-08-29 23:44:55 +02:00
Abe Jellinek
c255104ada duplicateAndConvertSelectedItem: Don't copy abstracts (#2799) 2022-08-29 16:27:26 -04:00
Dan Stillman
f4dfea6849 Don't repeatedly upload relations
Fixes #2772
2022-08-22 01:12:31 -04:00
Dan Stillman
8379540719 Include proper test for b373291c02 for #2771 2022-08-19 02:47:24 -04:00
Dan Stillman
b373291c02 Fixed filed items with annotations appearing in Unfiled Items
Fixes #2771

Regression from 20c6fe67
2022-08-19 00:15:55 -04:00
Abe Jellinek
3391f3bc99
Empty Trash: Visually remove deleted items, refresh icon (#2606)
There were a few problems causing the incorrect behavior:
1. Rows were being removed only if they had no non-deleted children, which
   wasn't the right check. We want to remove all rows with no *deleted*
   children.
2. Children of the removed rows weren't being removed with them.
3. We weren't invalidating the tree (which _removeRows() doesn't do).

Also:

* Erase trashed annotation after getAnnotations() test

Because ItemTree#notify() doesn't yet correctly handle refresh events on
parent items that are themselves children (three-level nesting: item ->
attachment -> annotation), this test was causing a failure in
itemTreeTest.js.
2022-08-18 21:14:34 -04:00
Dan Stillman
f368a53311 Fix and disable item-tree test for emptying trash
20c6fe6737 caused this to start failing, but only because the test was
testing something too specific. The change in that commit caused more
rows to be left behind when emptying the trash (for reasons I should
probably look into), but the trash wasn't being emptied properly before,
which #2606 should fix. This test should be restored as part of that PR.
2022-08-17 01:53:21 -04:00
Dan Stillman
20c6fe6737 Match parent attachments for annotation tags
Expose annotation tags in tag selector and match parent attachments when
filtering/searching

This also fixes searching for annotation text or comments when using
Everything quick search.

This is temporary until we display annotations in the items list
directly.
2022-08-16 22:56:39 -04:00
Dan Stillman
85b0c9dbad Fix importing of standalone attachments without URLs
And allow `importSnapshotFromFile()` without `parentItemID` or
`libraryID`, which is more consistent with other attachment functions

Follow-up to 318e4852e9

https://forums.zotero.org/discussion/comment/414802/#Comment_414802
2022-08-14 05:06:27 -04:00
Dan Stillman
318e4852e9 Fix importing of standalone attachments
Maybe has been broken for years?

https://forums.zotero.org/discussion/99020/warning-data-loss-when-exporting-collections
2022-08-13 16:23:00 -04:00
Dan Stillman
3dc3359cff Don't relate book sections to each other when creating from book
Fixes #2757
2022-08-13 05:45:23 -04:00
Dan Stillman
b505c630d3 Fix copying of standalone attachments between libraries
Regression in f684984b07 (maybe a race condition)
2022-08-13 02:00:41 -04:00
Dan Stillman
9b7b4fe134 Improve test for event-title substitution
And add comments

Follow-up to 20d0f103f
2022-08-10 01:34:57 -04:00
Dan Stillman
a9c3fc7790 Reset Zotero.locale to 'en-US' after cite test 2022-08-10 01:01:48 -04:00
Dan Stillman
20d0f103fd Automatically substitute event-title for event in styles
Stopgap until styles are updated in citation-style-language/styles#6151
2022-08-10 01:01:48 -04:00
Abe Jellinek
20eca3781d Add test for 87455d 2022-08-08 11:48:33 -04:00
Abe Jellinek
ad96323881
Duplicates Merge: Preserve embedded annotations (#2728) 2022-07-29 05:06:44 -04:00
Martynas Bagdonas
6733f2edca Freeze note schema version to 8
We can do it because it was only used to create a note from annotations.

No need to update schema version in Zotero client, unless using new
features when creating a note from annotations.
2022-07-25 18:04:00 +03:00
Dan Stillman
14a6ce000e Disable sort tests from 26a5e2900a for now
Until I can figure out the race-condition breakage they trigger later in
the file
2022-07-18 08:56:57 -04:00
Dan Stillman
acba90f272 Fix test failure after 26a5e2900a 2022-07-11 05:19:18 -04:00
Dan Stillman
26a5e2900a Better fix for errors from invalid sort fields
Just catch the error from `ItemTree::sort()` and clear the
secondary-sort and fallback-sort prefs so that sorting works on the next
attempt.

Replacement for a8ed30ce80

https://groups.google.com/g/zotero-dev/c/kc0-C6-SA74/m/bhHniGceAQAJ
2022-07-11 01:30:38 -04:00