EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #09218
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] staff search
- To: Yuri <yurj@alfa.it>, <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] staff search
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Wed, 22 Feb 2023 10:41:00 +0000
Hi Yuri,
After some investigation, there is in fact a simple way to fix it that is not too much of a hack. However, I am not yet sure this is a general fix I would want to apply to the GitHub codebase or just advise those that need it how to make the change.
Edit EPRINTS_PATH/cgi/search (or copy to cgi/search in your archive and change the the following if block:
if( $dataset->base_id )
{
push @filters,
{ meta_fields => ["metadata_visibility"], value => "show" };
}
to:
if( $dataset->base_id eq "eprint" && $searchid ne "staff" )
{
push @filters,
{ meta_fields => ["metadata_visibility"], value => "show" };
}
Regards
David Newman
On 22/02/2023 10:33 am, Yuri wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Thanks!
This bug is also in Eprints 3.3.15. I don't mind to be solved also in
it, just if it possible that the solution can work also on 3.3.15/3.3.16
so I can patch the code.
Il 22/02/23 10:27, David R Newman ha scritto:
Hi Yuri,
I think you have found a bug. The issue is that the search checks
that the metadata_visibility for any items that might otherwise be
found is set to 'show'. An item that is an old version of another
item will have its metadata_visibility set to 'hide'. For staff
search metadata_visibility should probably be ignored. I have created
a GitHub issue for this:
https://eur03.safelinks.protection.outlook.com/?url="">
What are other people's opinions? In an ideal world, I guess the
staff search should have a checkbox to say whether to show hidden items?
Regards
David Newman
On 22/02/2023 9:08 am, Yuri via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Hi!
the admin/staff search is useful to edit items, and the only tool for
editors to find a particular eprint by id. When searching for eprintid,
it doesn't work if the eprint is a predecessor. Actually, the search
finds only the last version of the eprints and none if I put an older
version eprintid in the eprintid field. Is there a way to change this
behaviour so our staff can search and edit also older versions?
*** Options:
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive:
https://eur03.safelinks.protection.outlook.com/?url="">
*** EPrints community wiki:
https://eur03.safelinks.protection.outlook.com/?url="">
- References:
- [EP-tech] staff search
- From: Yuri <yurj@alfa.it>
- Re: [EP-tech] staff search
- From: Yuri <yurj@alfa.it>
- [EP-tech] staff search
- Prev by Date: Re: [EP-tech] staff search
- Next by Date: [EP-tech] Upgrading 3.3.16 to
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):