It's really strange.  The 3 fields already exist in the Item record since they 
are added by default during an import.  But when I try to modify them just like 
I'd modify any other metadata field like dc.contributor.author or 
dc.language.iso, it doesn't REPLACE the values - it ADDS a new value.  Then if 
after the 2nd accession date, available date, and issue date have been 
duplicated (with the date I specify in the .csv input file) with this import, I 
can turn right around and feed it the following file and it will successfully 
blank out the new values I just added, but not the original ones added.



Here's an example of the dates in the Item that already exist in DSpace:



dc.date.accessioned     2009-08-04T20:22:32Z    -

dc.date.available       2009-08-04T20:22:32Z    -

dc.date.issued          2009-08-04T20:22:32Z    -



So I want to overwrite these values with the current date, so here's what my 
.csv file looks like:



id^collection^dc.date.accessioned[en_US]^dc.date.available[en_US]^dc.date.issued[en_US]

316222^2121/26228^2012-06-12T18:28:21Z^2012-06-12T18:28:21Z^2012-06-12T18:28:21Z



Instead of overlaying the old dates with the new ones from the .csv file, it 
adds 3 new fields, i.e., a new dc.date.accessioned, dc.date.available, and 
dc.date.issued so now here’s how my Item looks in DSpace:



dc.date.accessioned     2009-08-04T20:22:32Z    -

dc.date.accessioned     2012-06-12T18:28:21Z    -

dc.date.available       2009-08-04T20:22:32Z    -

dc.date.available       2012-06-12T18:28:21Z    -

dc.date.issued          2009-08-04T20:22:32Z    -

dc.date.issued          2012-06-12T18:28:21Z    -





Now if I run the update again with the following .csv file as input:



id^collection^dc.date.accessioned[en_US]^dc.date.available[en_US]^dc.date.issued[en_US]

316222^2121/26228^^^





…here’s what the Item record’s dates look like now:



dc.date.accessioned     2009-08-04T20:22:32Z    -

dc.date.available       2009-08-04T20:22:32Z    -

dc.date.issued          2009-08-04T20:22:32Z    -





In short, we’re back to the way it looked to begin with.  One more interesting 
thing to note is that if I now run the exact same input .csv file against the 
Item now, it says it has nothing to update.  So how does it distinguish between 
the 2012-06-12 dates that it deleted just fine and the older ones that it’s now 
ignoring?  Is it possible there’s some code someplace that says “if the 
field=dc.date.accessioned or dc.date.available or dc.date.issued AND its 
“place” in metadatavalue table = 1, DO NOT UPDATE/TOUCH these metadata 
fields???  I’ve looked and can’t find any anywhere.  This whole thing is quite 
baffling to me.



Thanks,

Sue

Sue Walker-Thornton

(w):  (757) 864-2368

(m):  (757) 506-9903





-----Original Message-----
From: ivan.ma...@gmail.com [mailto:ivan.ma...@gmail.com] On Behalf Of helix84
Sent: Tuesday, June 12, 2012 4:27 PM
To: Thornton, Susan M. (LARC-B702)[LITES]
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] Problem with "Import metadata" option on Admin 
screen in DSpace 1.7.1



Hi Sue,



first, I admit I never tried to actually modify values of these fields using 
batch metadata editor (BME). But I just checked dc.date.accessioned, 
dc.date.available and dc.description.provenance on an item which was created 
using BME and later a metadata value of the same item was modified using BME. 
All fields have only a single value and have the earlier date. This is on 
DSpace 1.8.2, can you confirm it on a testing server? In the past, I remember I 
encountered multiple values of the provenance field, but it was probably in 
1.6.2 and not using BME, but item importer.



Just a sidenote - these values are actually ignored by BME by default _during 
export_. See ignore-on-export in bulkedit.cfg. I don't know what happens when 
you try to import them.



On Tue, Jun 12, 2012 at 8:47 PM, Thornton, Susan M. (LARC-B702)[LITES] 
<susan.m.thorn...@nasa.gov<mailto:susan.m.thorn...@nasa.gov>> wrote:

> but wouldn’t I have to run index-update or index-init afterward if I

> used a SQL query to update the metadatavalue table?



You have to run index-update when you add/remove a metadata value.

index-init has to be run only when you add/remove a metadata field.



Regards,

~~helix84
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to