Hi all, we identified the following problem, but I do not know if it’s a bug or something is missing to configure correctly.
In an OJS 3.3.0-7 from where a Vufind server harvest the metadata of published articles, Vufind doesn’t identify the updated articles in OAI-PMH because the datestamp isn’t updated to the date the article was updated.
I will try to describe an example, in an article published in OJS with submission ID 2437, in OAI the datestamp of the record header is:
In the database, in the publication_settings table, it belongs to the 618 journal.
The datestamp belongs to the date in the last_modified field of the issues table with the UTC time adjustment.
This is the publications table:
And this is the submissions table:
From OJS, after updating the article title and republishing, the dates were updated like this, in the submissions table updated the field date_last_activity but not the last_modified field:
In the publications table updated the field last_modified:
In the issues table didn’t update any field:
In OAI the datestamp of the article wasn’t updated, so it doesn’t re-harvest it:
To solve it, it was modified in the file classes/oai/ojs/OAIDAO.inc.php, adding p.last_modified in the following query:
- 'SELECT GREATEST(a.last_modified, i.last_modified, p.last_modified) AS last_modified,
- ’ . ($from?’ AND GREATEST(a.last_modified, i.last_modified, p.last_modified) >= ’ . $this->datetimeToDB($from):’’) . ’
- ’ . ($until?’ AND GREATEST(a.last_modified, i.last_modified, p.last_modified) <= ’ . $this->datetimeToDB($until):’’) . ’
With this change, the OAI already shows the datestamp with the date of the last_modified field of the publications table and vufind already identifies it as an updated article to re-harvest it.
I await your comments to know if this modification is correct or any suggestions.
Regards.
David