Journal - get just publisher name instead of full imprint
Hi Koosum
your code from populate-journals:
rObj['meta,publisherName'] =
x.PublicationInfo !== undefined &&
x.PublicationInfo[0].Imprint !== undefined
? x.PublicationInfo.map(x => x.Imprint[0].ImprintFull[0]).slice(
-1,
)[0]
: ''
Here, can we get just the Entity instead of the full imprint? So for example from the following, just 'Nature Pub. Group'
<Imprint ImprintType="Original" FunctionType="Publication">
<Place>London :</Place>
<Entity>Nature Pub. Group</Entity>
<ImprintFull>London : Nature Pub. Group</ImprintFull>
</Imprint>
Could you also, if there are multiple <Imprint>
, chose the one with @ImprintType='Current'
over @ImprintType='Original'
?
So, from the following, we'd expect the second one:
<Imprint ImprintType="Original" FunctionType="Publication">
<Place>London,</Place>
<Entity>Macmillan Journals ltd.</Entity>
<ImprintFull>London, Macmillan Journals ltd.</ImprintFull>
</Imprint>
<Imprint ImprintType="Current" FunctionType="Publication">
<Place>Basingstoke :</Place>
<Entity>Nature Publishing Group</Entity>
<ImprintFull>Basingstoke : Nature Publishing Group</ImprintFull>
</Imprint>
When this is all ready, could you work with @XP and make sure the journals in the live DB are updated (and none deleted!)?