#53: Improve record retrieval in 'Get_Recid' function
-----------------------+----------------------------------------------------
Reporter: jcaffaro | Owner:
Type: task | Status: new
Priority: major | Milestone: v1.0
Component: WebSubmit | Version: v0.99.1
Keywords: |
-----------------------+----------------------------------------------------
When retrieving a record to edit based on this report number, the
'Get_Recid' function searches for matching report numbers in the
'reportnumber' index. Ideally only one record should match.
The problem is that the 'reportnumber' index is an aggregate of the main
report number field (037$a on demo site) and also the additional report
number field (088$a). In the particular scenario of two records A and B
with the markup described below, the Get_Recid will not be able to
uniquely identify the record to edit when trying to edit B:
'''Record A:'''
037__a:A
088__a:B
'''Record B:'''
037__a:B
The best solution would be to not fall into the above case... However the
function could still be improved by first checking in the main report
number field (either hardcoded 037$a (!), or in a new index
"mainreportnumber"), and falling back to searching into "reportnumber"
index if no record matches.
--
Ticket URL: <http://cdswaredev.cern.ch/invenio/ticket/53>
Invenio <http://invenio-software.org>