Closed diversemix closed 6 years ago
@hdrury1 Created a test submission and eJP successfully imported and called the endpoint. As recorded in the logs:
{"manuscriptId":"9e857f39-2472-4467-8a4e-3f9516dc6087","body":{"result":"success"},"level":"info","message":"MECA callback received","timestamp":"2018-10-19T08:50:17.235Z"}
@giorgiosironi / @damnhipster ... When we run psql
from within the staging container we actually connect to the locally running postgres container. We had to create the env vars found on the host: PGPASSWORD
, PGDATABASE
, PGHOST
Once connected to the database the manuscript was queried and the status was updated to MECA_IMPORT_SUCCEEDED
:
elifexpubstaging=> select * from manuscript where id='9e857f39-2472-4467-8a4e-3f9516dc6087';
id | journal_id | created | updated | created_by | previous_version | status |
form_state | decision | meta,title | meta,article_type | meta,article_ids | meta,abstract | meta,subjects
| meta,publication_dates | meta,notes |
cover_letter
| previousl
y_discussed | previously_submitted | cosubmission | opposed_senior_editors_reason | opposed_reviewing_editors_reason | suggestions_conflict |
related_manuscripts | submitter_signature | disclosure_consent | qc_issues | opposed_reviewers_reason
--------------------------------------+------------+-------------------------------+---------+--------------------------------------+------------------+-----------------------+-------
----------------------------------------------+----------+------------------+-------------------+------------------+---------------+---------------------------------------------------
+------------------------+------------+------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------
---------------+----------------------------------------+--------------------------------+-------------------------------+-------------------------------------+----------------------+
---------------------+---------------------+--------------------+-----------+----------------------------------
9e857f39-2472-4467-8a4e-3f9516dc6087 | | 2018-10-19 08:28:17.236945+00 | | 6ae7306f-9b3c-41de-a4ba-8f74d99aea8f | | MECA_IMPORT_SUCCEEDED | /submi
t/9e857f39-2472-4467-8a4e-3f9516dc6087/author | | This is my title | short-report | | | {computational-systems-biology,genetics-genomics}
| | | <p><b>How will your work make others in the field think differently and move the field forward?</b></p><p></p><p>Lots and lots.</p><p></p><p><b
>How does your work relate to the current literature on the topic?</b></p><p></p><p>Many much.</p><p></p><p><b>Who do you consider to be the most relevant audience for this work?</b><
/p><p></p><p>Lions and tigers and bears oh my!</p><p></p><p><b>Have you made clear in the letter what the work has and has not achieved?</b></p><p></p><p>Yus.</p><p></p> | Bob told me
it was great. | {"This is the previous article title"} | {"Second paper","Third paper"} | They don't like me. | They are working on similar things. | t |
| HD | t | | We're working in a similar area.
(1 row)
I have fed back to Clara some issues from a Product point of view with the way the import is being handled their end. Critically, there is an issue with the files.
@diversemix Can you confirm that the disclosure form is always called disclosure.pdf
and cover letter is always called coverletter.html
(or similar)? I'd like these to be imported as Cover Letter and Data Disclosure file types respectively but in order to do so we need to ensure they are consistently exported with the same file names.
Suggested and excluded editors are currently always imported as a sticky note. When Nathan has completed his work on the API eJP should be able to reconcile our export with users in their database.
Reviewers are being imported as expected and reconciled to users within eJP, which means @tamlyn 's algorithm to split the single string into First, Last is working!
@hdrury1 Yes ... (see https://github.com/elifesciences/elife-xpub/blob/7adc63d824d0d59f3d753c7eefa3c6cc8f778e83/server/meca/export.js#L12)
cover_letter.html
is always used.disclosure.pdf
is always used. When we run psql from within the staging container we actually connect to the locally running postgres container. We had to create the env vars found on the host: PGPASSWORD, PGDATABASE, PGHOST
We cannot override this in general for the container as when we did it broke the postgres
setup process as it was relying on psql
in its bootstrap. We could provision a /usr/local/bin/psql-xpub
script that does something similar to the formula check for database existence:
DB_ENV="-e PGHOST=${PGHOST} -e PGPORT=${PGPORT} -e PGUSER=${PGUSER} -e PGDATABASE=${PGDATABASE} -e PGPASSWORD=${PGPASSWORD}"
docker run -it ${DB_ENV} postgres:10.4 psql
Would that be useful?
Why do we even run a local postgres container in staging? ... am I missing something :thinking:
PR environments for elife-xpub-deployment
use a local Postgres instance.
Closing down and capturing non-callback comments on the Trello board.
Test that the callback is being called by eJP after the import and that the status of the manuscript is updated.