OJS 2.x list of published article authors

Hello anyone,

I’m trying to extract a report on all published articles, with their authors (some author info), article metadata (more important is subject), issue published…

Editing /var/www/devojs.ibict.br/plugins/reports/articles/ArticleReportDAO.inc.php replacing abstract with subject in the array would/should do it, right?

Unfortunately, it doesn’t…

Hello all!!!

Replying to myself, as usual because I ask before I actually get my head on the problem… and usually the solution is right there…

Anyway, I figured out I had to edit both
ArticleReportPlugin.inc.php and ArticleReportDAO.inc.php to match the data collected from the database and the column output…

Now that I understand it, it may be easier to customize it to our eventual needs, such as exporting only published articles…

Hello all,

So, I was thinking about adding the article’s published date, but not really sure how… and the issue it was published in would also be great.

Should I create a new variable for each, such as $articlesReturner, $decisionDatesIterator and the such?

Hi @ramon,

I’d suggest adding a LEFT JOIN published_articles and LEFT JOIN issues to the query that generates $articlesReturner. Each of those, when matched, will provide a publication date.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

Sorry to be so dumb, but I’m not able to add a viable left join operation… I’ve tested a few options, but nothing worked so far:

SELECT
MAX(d.date_decided) AS date_decided,
d.article_id AS article_id,
p.date_published AS article_published,
i.date_published AS issue_published
LEFT JOIN published_articles AS p ON d.article_id = p.article_id
LEFT JOIN issues AS i ON a.journal_id = i.journal_id
FROM edit_decisions d, articles a
WHERE a.journal_id = 1 AND
a.submission_progress = 0 AND
a.article_id = d.article_id AND
i.published = 1
GROUP BY d.article_id

Hello all,

Somehow now it worked…

SELECT MAX( d.date_decided ) AS date_decided, d.article_id AS article_id, p.date_published AS article_published, i.date_published AS issue_published
FROM edit_decisions d, articles a, issues i, published_articles p
WHERE a.journal_id =1
AND a.submission_progress =0
AND a.article_id = d.article_id
AND i.published =1
GROUP BY d.article_id
LIMIT 0 , 100

Hello all,

How hard could it be for this to generate an HTML page with the content within a table?

CSV files are insane, always lots of work to clean up when data is a mess… no separators can control what users use within the content…
Copying an HTML table to a spreadsheet app is so much easier…

Hi @ramon,

LibreOffice has a bulletproof CSV import tool; there shouldn’t be any need to e.g. consider quotes in quote-quoted CSVs.

Regards,
Alec Smecher
Public Knowledge Project Team

There are commas within certain fields required for the analysis, and it breaks the import… Will try on LibreOffice (hate it!!)… will report soon…

Hi @ramon,

The LibreOffice CSV import tool can handle commas within fields without trouble.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

Thanks… Antivirus was preventing LibreOffice to be installed, but worked fine and managed the CSV much better. Unfortunately, my commands did not export publication dates anywhere…

$result =& $this->retrieve(
'SELECT MAX(d.date_decided) AS date_decided,
d.article_id AS article_id,
p.date_published AS article_published,
i.date_published AS issue_published
FROM edit_decisions d,
articles a,
issues i,
published_articles p

                    WHERE   a.journal_id = ? AND
                            a.submission_progress = 0 AND
                            a.article_id = d.article_id AND
                            i.published = 1
                    GROUP BY d.article_id',
                    array((int) $journalId)
            );

Plugin locale keys are not available for output either…

$columns = array_merge($columns, array(
‘section_title’ => __(‘section.title’),
‘language’ => __(‘common.language’),
‘editor_decision’ => __(‘submission.editorDecision’),
‘status’ => __(‘common.status’),
‘article_published’ => (‘plugins.reports.articles.articleDatePublished’),
‘issue_published’ => (‘plugins.reports.articles.issueDatePublished’)
));

Hello all,

Is there anyone with skills, time and availability to help with this?