Preserve article ids in native article/issue import

Hi,

when importing/exporting issues from one OJS installation to another (OJS 3.1.1), I want the article ids to be preserved, because DOIs use the article id.

In the export file, I tried to set

type=“internal” advice=“ignore” 10

to

type=“internal” advice=“update” 10

But still the article id is auto incremented.

Is there another way to preserve article ids or do I have to do something for the update to take place?

best,
Carola

Hi @carola!

As you have correctly stated, changing the advice to “update” will not add the necessary data to the database.

Is there a <id type="doi" advice="update">*your doi prefix*/10</id> xml tag inside your exported file? If it is there, if you import that file, the article that will be inserted as the result of the import will retain the previously assigned doi (in our case the *your doi prefix*/10).

Be extra careful with “batch reassigning” dois function. It may change the doi previously assigned, updating it according to the crossref plugin’s current configuration.

Best regards,
@Dimitris_Efstathiou

Hi @Dimitris_Efstathiou,

Thanks for your advice!

I would rather want to keep the DOIs and article ids matching, so that the reassigning function can do no harm.

In the worst case, articles have to be imported one by one, in the order of the article id. But I still hope to avoid this.

best,
Carola

Hi @carola!

I think that keeping the same article ids of one installation/journal consistent with another installation/journal can be rather messy if at all possible generally. For example consider that the journal in which you want to import the articles could already have articles of its own, in general.

Could you describe your scenario in more details, so we could check a possible solution based on the existing code base?

Regards,
@Dimitris_Efstathiou

Hi @Dimitris_Efstathiou,

we migrate a journal with 12 articles (2 issues) from one single journal OJS 3.1.1 installation to another (fresh) single journal OJS 3.1.1 installation. We want to use the user export/import and the issue export/import. The old OJS 3.1.1 installation will be closed down, the new one has no articles/issues yet but will have new issues and artilces in the future (after the import).

The user export/import works fine. The only problem now are the article ids. Since we have only 12 articles, a one by one article import would be possible as a last resort.

The DOIs only have year and articel ids as variables (%Y and $a).

best,
Carola

@carola,

Are the issues/articles ids from the source journal sequential? (meaning 1,2,3… without numbering gaps?)

Thanks,
@Dimitris_Efstathiou

@Dimitris_Efstathiou

there are some gaps, but I thought to insert dummies.

best,
Carola

P.S. 1,3,4,5,6,8,9,12,14,15,16,17

@carola,

Maybe you could try to insert the “dummy” articles in the export file, for example between the first and second actual <article> tag, so that the article with id=2 will be inserted between id=1 and id=3. After that you can archive or delete the dummy articles.

Even though that solution is not optimal, it could save you from the one-by-one article import. (and given that your case has a small amount of articles)

Thanks,
@Dimitris_Efstathiou

PS: even though that is not a solution from the OJS side, you can always use crossref’s tools in order to declare aliases for already existing dois, if you like. (That may include additional charges at the Crossref side)

@Dimitris_Efstathiou

That’s a good idea! Thanks!

I will try and report here if it worked,

best,
Carola