XML imported articles not getting indexed in some cases

Hi,

I noticed that some of my imported articles are not getting indexed. The reason is that the XML import files have not included the date_submitted date which should be optional: https://github.com/pkp/pkp-lib/blob/master/plugins/importexport/native/pkp-native.xsd#L237

So when date_submitted is not there, the import saves NULL to date_submitted and the article search index is not created for these articles:

I will add the date_submitted parameter to my conversion script of course, but is it necessary to check for date_submitted there?

Hi @ajnyga,

I think date_submitted is a proxy in this case for ensuring that the submission is “complete”, i.e. it’s not somewhere in the middle of the submission process. A better match would be $article->getSubmissionProgress() – check that it’s zero (meaning that the submission process is complete). This wouldn’t accidentally exclude articles without submission dates.

Regards,
Alec Smecher
Public Knowledge Project Team

Yes that is probably what it is and that is why the having that optional in the XML schema is a bit problematic.

I could do a pr, but I do not know if there is any point when you could just do the change with the same effort as doing a merge?

Hi @ajnyga,

Committed, thanks!

Regards,
Alec Smecher
Public Knowledge Project Team