[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] staff search



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=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fissues%2F299&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca47977ee0e854cd69df308db14c14ae3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638126592627822175%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VOpz43MTwu%2BgSfAbfPazs6%2FeJ3ZvEqKrHdOH6c4VCJA%3D&reserved=0 
>>
>>
>> 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=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca47977ee0e854cd69df308db14c14ae3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638126592627822175%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5sQo5im3piKKNSkAds5qXpCzgxd4Qn8%2BuCsJTOQ5VPk%3D&reserved=0 
>>>
>>> *** EPrints community wiki:
>>> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca47977ee0e854cd69df308db14c14ae3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638126592627822175%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2nzgb4HeUpvMadA5idlVO8y%2FToAaV%2BeiwHaeW6Q3ZJM%3D&reserved=0 
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230222/65dc507f/attachment.html