Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OJS 3.4] variable{$editorName} not replaced in activity log for decisions #10362

Open
forgive38 opened this issue Sep 3, 2024 · 10 comments
Open
Assignees
Milestone

Comments

@forgive38
Copy link
Contributor

Describe the bug
When you take a decision, you see that in activity log

2024-09-03 Administrator Testdrive {$editorName} sent this submission back to the copyediting stage.
2024-09-03 Administrator Testdrive {$editorName} sent this submission to the production stage.

What application are you using?
OJS (testdrive 3.4 or 3.4.0.6)

@aleskl
Copy link

aleskl commented Oct 11, 2024

I can also see placeholders not populating in the Activity log, it seems to be specific for editors:

2024-10-09 {$editorName} requested revisions for this submission.
2024-10-09 Editor {$userName} has confirmed a review for the round 1 review for submission 3286.

What application are you using?
OJS 3.4.0.6

@asmecher asmecher added this to the 3.4.0-8 milestone Oct 23, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Nov 21, 2024
@kaitlinnewson kaitlinnewson self-assigned this Nov 21, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Nov 21, 2024
@kaitlinnewson
Copy link
Member

kaitlinnewson commented Nov 21, 2024

PRs for review:

3.4:

main:

@Vitaliy-1 are you able to review?

This only covers cases of new editorial decisions being logged though, and there still may be missing or incorrectly named editorName values in the event_log_settings table - I can try another PR for migrations if it makes sense to do so.

For the cases where $userName is not populated, another option could be to replace $userName with $editorName in the locale files instead, but it looks like it was writing values to the DB as $userName in 3.3 so that will still lead to some other inconsistencies.

@Vitaliy-1
Copy link
Collaborator

Thanks! This also requires porting to main.

This only covers cases of new editorial decisions being logged though, and there still may be missing or incorrectly named editorName values in the event_log_settings table - I can try another PR for migrations if it makes sense to do so.

For 3.5 it makes sense. If we ever release 3.4.1, we can add migration there too.

For the cases where $userName is not populated, another option could be to replace $userName with $editorName in the locale files instead, but it looks like it was writing values to the DB as $userName in 3.3 so that will still lead to some other inconsistencies.

And for 3.2 it was $editorName? If it always was $userName, we can stick with it

@kaitlinnewson
Copy link
Member

For PKPReviewerGridHandler, it was $userName in 3.3 and 3.2, and it was only $editorName in 3.4 - so in that case it makes sense to stick with it and migrate any discrepancies created in 3.4 for 3.4.1 (if released) and 3.5. I'll look at those next.

kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Nov 28, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Nov 28, 2024
kaitlinnewson added a commit to kaitlinnewson/ojs that referenced this issue Nov 28, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Nov 28, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Nov 28, 2024
kaitlinnewson added a commit to kaitlinnewson/ops that referenced this issue Nov 28, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Nov 28, 2024
@kaitlinnewson
Copy link
Member

@Vitaliy-1 I've forward-ported, added the migration, and listed the PRs above - ready for another review.

I made a small adjustment to change userName to editorName in the locales file instead, as I noticed this was changed in a previous PR in order to make it less ambiguous (in some settings in event_log_settings username refers to the account username and not the full name). In the DB it was migrated to editorName for 3.4 already so that part is covered for that event type (SUBMISSION_LOG_REVIEW_CONFIRMED).

kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Nov 28, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Nov 28, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Nov 28, 2024
@asmecher
Copy link
Member

@kaitlinnewson / @Vitaliy-1, I'll leave this against the 3.4.0-8 release for a few more hours -- but I am planning to release that today, and will defer this to 3.4.0-9 if it's still outstanding by the afternoon. Up to you two whether you want to rush it.

@asmecher asmecher modified the milestones: 3.4.0-8, 3.4.0-9 Nov 29, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Dec 19, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Dec 19, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Dec 19, 2024
kaitlinnewson added a commit to kaitlinnewson/ojs that referenced this issue Dec 19, 2024
kaitlinnewson added a commit to kaitlinnewson/ojs that referenced this issue Dec 19, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Dec 19, 2024
kaitlinnewson added a commit to kaitlinnewson/ops that referenced this issue Dec 19, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Dec 19, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Dec 19, 2024
@kaitlinnewson
Copy link
Member

Hi @bozana, this is the issue I mentioned - would you be able to review? PRs are listed above and I've rebased. I see some test failures but I think they are unrelated. Thanks!

@bozana
Copy link
Collaborator

bozana commented Dec 20, 2024

Hi @kaitlinnewson, the PRs look good. I left just two minor comments for the migration SQL.
I understand that the problem was that that setting was missing in the DB for the two event types.
Is there any problem with data being wrong in the DB?
Thanks a lot!

p.s. let me know if I should then immediately merge...

@kaitlinnewson
Copy link
Member

Hi @bozana, for the 2 events SUBMISSION_LOG_EDITOR_RECOMMENDATION and SUBMISSION_LOG_EDITOR_DECISION, the data gaps in the DB are covered by the migration - and the data gap has only been present for 3.4.

For the SUBMISSION_LOG_REVIEW_CONFIRMED event, this fixes the locale files instead of touching the database, as it's just the locale files that were missed (the data for this event was migrated for 3.4).

kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Dec 20, 2024
kaitlinnewson added a commit that referenced this issue Dec 20, 2024
#10362 include editorName when logging an editorial decision
kaitlinnewson added a commit to kaitlinnewson/ojs that referenced this issue Dec 20, 2024
@kaitlinnewson
Copy link
Member

@bozana I adjusted based on your feedback for the migration and merged to main, just the 3.4 PR left to merge - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants