Continuous publication

Hi community!

I am currently the technical manager of the Universidad Nacional de Lanus’ journals portal.

During this year we made the migration to OJS 3 and due to the constant evolution of the editorial process we were asked to publish the articles from this year on a continuous basis and not structured in sections.

At first, we created a volume that would be used to publish the articles one by one, in our case - Vol. 15 (2019).

Then, it was necessary to modify a query to the database in one of the DAO files that I will detail later and by creating a variable, send it to the template that will use this information.

In this way, having the information in the template, we made a static comparison to show the volumes from now on continuous, keeping the archive in its classic structure of volume and number.

It is important to have personalization options that allow you to manage journal publications in a classic, continuous or both.

The solution we implement is simple and static but it is useful to visualize that with minimal changes, a need that is becoming a global trend can be satisfied in the next release of OJS.

The modified files on this implementation are:

/classes/article/PublishedArticleDAO.inc.php

Added a function that allows to obtain the articles in a continuous way organized by date, section and sequence, whose return is used by the file IssueHandler.inc.php and then by a design template.

function getPublishedArticlesContinuous($issueId) {
	$params = array_merge(
   $this->getFetchParameters(),
		array(
			(int) $issueId,
			(int) $issueId
		)
	);

	$sql = 'SELECT DISTINCT
			ps.*,
			s.*,
			COALESCE(o.seq, ps.seq) AS section_seq,
			ps.seq,
			' . $this->getFetchColumns() . '
		FROM    published_submissions ps
			LEFT JOIN submissions s ON ps.submission_id = s.submission_id
			' . $this->getFetchJoins() . '
			LEFT JOIN custom_section_orders o ON (s.section_id = o.section_id AND o.issue_id = ?)
		WHERE    ps.submission_id = s.submission_id
			AND ps.issue_id = ?
			AND s.status <> ' . STATUS_DECLINED . '
		ORDER BY ps.date_published DESC, section_seq ASC, ps.seq ASC';

	$result = $this->retrieve($sql, $params);

	$publishedArticles = array();
	while (!$result->EOF) {
		$publishedArticles[] = $this->_fromRow($result->GetRowAssoc(false));
		$result->MoveNext();
	}

	$result->Close();
	return $publishedArticles;
}

/pages/issue/IssueHandler.inc.php

We added a line that allows a variable of the Array type that contains the articles to be available, organized by date, section and sequence, from the design. Aggregated line commented.

static function _setupIssueTemplate($request, $issue, $showToc = false) {
	$journal = $request->getJournal();
	$user = $request->getUser();
	$templateMgr = TemplateManager::getManager($request);

	// Determine pre-publication access
	// FIXME: Do that. (Bug #8278)

	$templateMgr->assign(array(
   'issueIdentification' => $issue->getIssueIdentification(),
		'issueTitle' => $issue->getLocalizedTitle(),
		'issueSeries' => $issue->getIssueIdentification(array('showTitle' => false)),
	));

	$locale = AppLocale::getLocale();

	$templateMgr->assign(array(
		'locale' => $locale,
	));

	$issueGalleyDao = DAORegistry::getDAO('IssueGalleyDAO');
	$publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');

	$genreDao = DAORegistry::getDAO('GenreDAO');
	$primaryGenres = $genreDao->getPrimaryByContextId($journal->getId())->toArray();
	$primaryGenreIds = array_map(function($genre) {
		return $genre->getId();
	}, $primaryGenres);

	$templateMgr->assign(array(
		'issue' => $issue,
		'issueGalleys' => $issueGalleyDao->getByIssueId($issue->getId()),
		'publishedArticles' => $publishedArticleDao->getPublishedArticlesInSections($issue->getId(), true),
		'publishedArticlesContinuous' => **$publishedArticleDao->getPublishedArticlesContinuous($issue->getId()), // AGGREGATED **
		'primaryGenreIds' => $primaryGenreIds,
	));

	// Subscription Access
	import('classes.issue.IssueAction');
	$issueAction = new IssueAction();
	$subscriptionRequired = $issueAction->subscriptionRequired($issue, $journal);
	$subscribedUser = $issueAction->subscribedUser($user, $journal);
	$subscribedDomain = $issueAction->subscribedDomain($request, $journal);

	if ($subscriptionRequired && !$subscribedUser && !$subscribedDomain) {
		$templateMgr->assign('subscriptionExpiryPartial', true);

		// Partial subscription expiry for issue
		$partial = $issueAction->subscribedUser($user, $journal, $issue->getId());
		if (!$partial) $issueAction->subscribedDomain($request, $journal, $issue->getId());
		$templateMgr->assign('issueExpiryPartial', $partial);

		// Partial subscription expiry for articles
		$publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');
		$publishedArticlesTemp = $publishedArticleDao->getPublishedArticles($issue->getId());

		$articleExpiryPartial = array();
		foreach ($publishedArticlesTemp as $publishedArticle) {
			$partial = $issueAction->subscribedUser($user, $journal, $issue->getId(), $publishedArticle->getId());
			if (!$partial) $issueAction->subscribedDomain($request, $journal, $issue->getId(), $publishedArticle->getId());
			$articleExpiryPartial[$publishedArticle->getId()] = $partial;
		}
		$templateMgr->assign('articleExpiryPartial', $articleExpiryPartial);
	}

	$templateMgr->assign(array(
		'hasAccess' => !$subscriptionRequired || $issue->getAccessStatus() == ISSUE_ACCESS_OPEN || $subscribedUser || $subscribedDomain
	));

	import('classes.payment.ojs.OJSPaymentManager');
	$paymentManager = Application::getPaymentManager($journal);
	if ( $paymentManager->onlyPdfEnabled() ) {
		$templateMgr->assign('restrictOnlyPdf', true);
	}
	if ( $paymentManager->purchaseArticleEnabled() ) {
		$templateMgr->assign('purchaseArticleEnabled', true);
	}
}

All the above mentioned is implemented on production for one of our journals at “Published 2019” tab.

http://revistas.unla.edu.ar/saludcolectiva/
http://revistas.unla.edu.ar/saludcolectiva/issue/view/137

@asmecher

Regards,
Diego

1 Like

Good morning my name is Carlos Martínez (https://sbir.upct.es) we have moved to continous publication model.
I sent a request to CrossRef regarding the issue between pages and elocation-id and I received this answer:

Hi Carlos,

If your articles are not given page numbers, you can provide an article number, eLocator, etc. in lieu of page numbers. However, this article ID should not go in the metadata tags, because is it not a page number.

Instead, you should put the article ID into a <item_number> tag with an ‘article_number’ attribute. This <item_number> is nested within a <publisher_item> tag.

This is explained in detail, with example XML, here:
https://www.crossref.org/education/content-registration/administrative-metadata/article-ids/

I am not sure whether OJS’s Crossref plugin supports the submission of article IDs. You would need to contact the Support team at PKP (the organization responsible for the Open Journal System (OJS)), or search the PKP Community Forum to determine whether that’s something they can support.

Is OJS contemplating this possibility ?:
Set the possibility of differentiating articles as a continuous publication and metadata repercussion

Thanks
Carlos

Hi Carlos,

This has been discussed at https://github.com/pkp/pkp-lib/issues/4695 but it has not yet been implemented. Our intention was to include it with 3.2 but we were not able to fit the work in. The same is true of our next release, 3.3, but that too is overloaded so this work may not make it in.

This would be a great place for a community contribution if any institution needing this has developer resources to devote to it.

Thank you :crossed_fingers: