phpmysqlojs

OJS - Values of "status" attribute in articles table


I'm currently working with OJS (Open Journal System) and I am developing a new plugin that shows some statistics based on articles attributes.

One of the most important attributes for me is the "status". I have observed that rejected articles have status value = 0, but this value changes on published articles depending on the reviewing process (It is often 1 or 3)

I can't find the meaning of the distinct values of this attribute, all I found on OJS documentations is a brief description about each table in the database:

http://pkp.sfu.ca/ojs/docs/technicalreference/2.1/designOverviewDatabaseDesign.html

But this is not enough for me. There isn't any usefull information in dbscripts/xml/ojs_schema.xml either.

Can someone explain what do the distinct values on this attribute mean, or tell me where can I find detailed information about the database structure please?

Thank you all in advance.


Solution

  • Ferran, the "status" constants are defined in classes/article/Article.inc.php:

    // Submission status constants
    define('STATUS_ARCHIVED', 0);
    define('STATUS_QUEUED', 1);
    // define('STATUS_SCHEDULED', 2); // #2187: Scheduling queue removed.
    define('STATUS_PUBLISHED', 3);
    define('STATUS_DECLINED', 4);
    

    The publication status of the article may also be important; to determine this, you'll need to join from articles to published_articles on article_id.

    A good way to see how the article status is used is to look at the queries that get submissions in various queues. See for example classes/submission/sectionEditor/SectionEditorSubmissionDAO.inc.php in the getSectionEditorSubmissionsInEditing function. For a submission to be considered "In Editing", status must be STATUS_QUEUED (=1).

    The details will vary somewhat on your version of OJS, as this has evolved over the years.