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?
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…
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
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
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
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…
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…