-
Notifications
You must be signed in to change notification settings - Fork 535
Closed
Description
Observed on my laptop running 35c42ad (4.2 branch, pre-release). Deleting a file from a published version (not a draft) via SWORD creates a draft but doesn't delete the file.
Steps to reproduce:
- via GUI, create dataset
- via GUI, upload zip of three text files: https://github.com/IQSS/dataverse/blob/4.2/scripts/search/data/binary/3files.zip
- via GUI, publish dataset
- via SWORD, try to delete a file
Expected result: new draft created, file deleted
Actual result: new draft created, file NOT deleted
murphy:dataverse pdurbin$ curl -s -k -u $API_TOKEN: https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ | xmllint -format -
<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<bibliographicCitation xmlns="http://purl.org/dc/terms/">Admin, Dataverse, 2015, "swordBug", http://dx.doi.org/10.5072/FK2/CS4GGQ, Root Dataverse, V1</bibliographicCitation>
<generator uri="http://www.swordapp.org/" version="2.0"/>
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ</id>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ" rel="edit"/>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ" rel="http://purl.org/net/sword/terms/add"/>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/study/doi:10.5072/FK2/CS4GGQ" rel="edit-media"/>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/statement/study/doi:10.5072/FK2/CS4GGQ" rel="http://purl.org/net/sword/terms/statement" type="application/atom+xml; type=feed"/>
<treatment xmlns="http://purl.org/net/sword/terms/">no treatment information available</treatment>
<link href="http://dx.doi.org/10.5072/FK2/CS4GGQ" rel="alternate"/>
</entry>
murphy:dataverse pdurbin$
murphy:dataverse pdurbin$
murphy:dataverse pdurbin$ curl -s -k -u $API_TOKEN: https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/statement/study/doi:10.5072/FK2/CS4GGQ | xmllint -format -
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ</id>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ" rel="self"/>
<title type="text">swordBug</title>
<author>
<name>Admin, Dataverse (Dataverse.org)</name>
</author>
<updated>2015-08-17T18:42:16.576Z</updated>
<entry>
<content type="text/plain" src="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1194/file1.txt"/>
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1194/file1.txt</id>
<title type="text">Resource https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1194/file1.txt</title>
<summary type="text">Resource Part</summary>
<updated>2015-08-17T18:51:14.349Z</updated>
</entry>
<entry>
<content type="text/plain" src="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1193/file2.txt"/>
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1193/file2.txt</id>
<title type="text">Resource https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1193/file2.txt</title>
<summary type="text">Resource Part</summary>
<updated>2015-08-17T18:51:14.350Z</updated>
</entry>
<entry>
<content type="text/plain" src="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1195/file3.txt"/>
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1195/file3.txt</id>
<title type="text">Resource https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1195/file3.txt</title>
<summary type="text">Resource Part</summary>
<updated>2015-08-17T18:51:14.350Z</updated>
</entry>
<category term="latestVersionState" scheme="http://purl.org/net/sword/terms/state" label="State">RELEASED</category>
<category term="locked" scheme="http://purl.org/net/sword/terms/state" label="State">false</category>
<category term="isMinorUpdate" scheme="http://purl.org/net/sword/terms/state" label="State">true</category>
</feed>
murphy:dataverse pdurbin$
murphy:dataverse pdurbin$ curl -i -u $API_TOKEN: -X DELETE -k https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1193/file2.txt
HTTP/1.1 204 No Content
Server: GlassFish Server Open Source Edition 4.1
X-Powered-By: Servlet/3.1 JSP/2.3 (GlassFish Server Open Source Edition 4.1 Java/Oracle Corporation/1.8)
Date: Mon, 17 Aug 2015 18:51:38 GMT
murphy:dataverse pdurbin$
murphy:dataverse pdurbin$ curl -s -k -u $API_TOKEN: https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ | xmllint -format -
<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<bibliographicCitation xmlns="http://purl.org/dc/terms/">Admin, Dataverse, 2015, "swordBug", http://dx.doi.org/10.5072/FK2/CS4GGQ, Root Dataverse, DRAFT VERSION </bibliographicCitation>
<generator uri="http://www.swordapp.org/" version="2.0"/>
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ</id>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ" rel="edit"/>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ" rel="http://purl.org/net/sword/terms/add"/>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/study/doi:10.5072/FK2/CS4GGQ" rel="edit-media"/>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/statement/study/doi:10.5072/FK2/CS4GGQ" rel="http://purl.org/net/sword/terms/statement" type="application/atom+xml; type=feed"/>
<treatment xmlns="http://purl.org/net/sword/terms/">no treatment information available</treatment>
<link href="http://dx.doi.org/10.5072/FK2/CS4GGQ" rel="alternate"/>
</entry>
murphy:dataverse pdurbin$ curl -s -k -u $API_TOKEN: https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/statement/study/doi:10.5072/FK2/CS4GGQ | xmllint -format -
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ</id>
<link href="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit/study/doi:10.5072/FK2/CS4GGQ" rel="self"/>
<title type="text">swordBug</title>
<author>
<name>Admin, Dataverse (Dataverse.org)</name>
</author>
<updated>2015-08-17T18:51:37.913Z</updated>
<entry>
<content type="text/plain" src="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1194/file1.txt"/>
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1194/file1.txt</id>
<title type="text">Resource https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1194/file1.txt</title>
<summary type="text">Resource Part</summary>
<updated>2015-08-17T18:52:13.006Z</updated>
</entry>
<entry>
<content type="text/plain" src="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1193/file2.txt"/>
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1193/file2.txt</id>
<title type="text">Resource https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1193/file2.txt</title>
<summary type="text">Resource Part</summary>
<updated>2015-08-17T18:52:13.006Z</updated>
</entry>
<entry>
<content type="text/plain" src="https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1195/file3.txt"/>
<id>https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1195/file3.txt</id>
<title type="text">Resource https://localhost:8181/dvn/api/data-deposit/v1.1/swordv2/edit-media/file/1195/file3.txt</title>
<summary type="text">Resource Part</summary>
<updated>2015-08-17T18:52:13.006Z</updated>
</entry>
<category term="latestVersionState" scheme="http://purl.org/net/sword/terms/state" label="State">DRAFT</category>
<category term="locked" scheme="http://purl.org/net/sword/terms/state" label="State">false</category>
<category term="isMinorUpdate" scheme="http://purl.org/net/sword/terms/state" label="State">true</category>
</feed>
murphy:dataverse pdurbin$
Note that deleting a file from a dataset that is already in draft seems to work fine.
Reactions are currently unavailable