[ 
https://jira.duraspace.org/browse/DS-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Phillips updated DS-1052:
-------------------------------

    Attachment: DS-1052.patch

This patch addresses the bug with two changes. First when a browse query is 
executed and sorted based upon any sort option the SQL query is modified so 
that "NULLS LAST" is added. Thus the order by clause would look something like 
this:

SELECT …. ORDER BY sort_column DESC NULLS LAST …

As one would expect this causes null values to appear at the end of the list. 
It works for both Postgres and Oracle. I haven't tested in it Oracle, but this 
article says it should work:

http://www.techrepublic.com/blog/datacenter/control-null-data-in-oracle-using-the-order-by-clause/121

The second change is to the InstallItem.restore() method to add a 
dc.date.accessioned (and date.issued) if one does not exist. It will also now 
add a provenance message stating that the item was restored on a particular 
date.
                
> Items without date.accessioned are perminantly sorted to the top of all date 
> based searches.
> --------------------------------------------------------------------------------------------
>
>                 Key: DS-1052
>                 URL: https://jira.duraspace.org/browse/DS-1052
>             Project: DSpace
>          Issue Type: Bug
>          Components: DSpace API
>            Reporter: Scott Phillips
>            Assignee: Scott Phillips
>            Priority: Major
>         Attachments: DS-1052.patch
>
>
> Almost all items in DSpace have a dc.date.accessioned because it is 
> automatically assigned when the item is created. There are two conditions 
> which can occur that causes an item to get lose it's accessioned date.
> 1) A person with editing privileges on an item removes the 
> dc.date.accessioned metadata field.
> 2) The item's accessioned date is created via the InstallItem.restore() 
> method.
> When one of these conditions occur the item gets inserted into the browsing 
> sort table with a null value. When ever a recent submission query is run 
> these items will always be returned first because Postgres and Oracle always 
> return NULLS first when executing an ORDER BY clause. This means that these 
> items are permanently penned at the top of the RSS feed and recent 
> submissions sections sections.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.duraspace.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to