-
Notifications
You must be signed in to change notification settings - Fork 444
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
Include metadataLocales in /submissions/{submissionId} API #10329
Comments
@jardakotesovec, could you test if this is what you need? |
@bozana Thank you! Looking good. I am not sure if this might generate individual sql queries per each submission on endpoints like /submissions? As I run into couple more issues with the publication forms - I did create discussion to explore alternative solution than client side manipulation. Lets see how that goes and than will come back to this one. |
Yes, this will produce 2 additional sql queries per submission in the list. |
Doesn't /submissions use summary props, where this metadataLocales is not included? |
I was referring to the backend submission controller, parts where we mapping submissions to the submissions list. |
I will close this one for now in favour of #10336. We might need to do this once we would shift form building towards JS, but let's not get ahead of ourselves too much. |
So it turned out this still could be useful for some forms. @Vitaliy-1 Could you please advise how to make this either performant or other option that would work fine for me to expose it only on /submissions/{submissionId}, so it does not cause problems on the listings we have. |
As far as I can see this property is not included into (backend) submission listing, s. https://github.com/pkp/pkp-lib/blob/main/classes/submission/maps/Schema.php#L62. |
Thanks, not included then! My bad. |
@Vitaliy-1 @bozana Oki, in that case are we comfortable to merge it? |
@bozana I see that your implementation would return only array of the locale names. Would be possible to include the labels as mentioned in original issue? I could get the labels some other way if we could assume that whatever locales are selected for given journal stay same - but since it can gets changes - I can't think of reliable way of getting the labels for all locales that might occur for given submission. |
@jardakotesovec, let me see -- it should be possible for me to change it... |
Hi @jardakotesovec, what do you mean with
That JSON part looks for me locally like this: |
@bozana I see, ok. From the schema it seems that it would be only array of strings? Thats what confused me.
|
Ah, yes, you are right -- the schema part looks wrong... Let me think about it... |
How about having this: |
@bozana Thank you, yes this shape is perfectly fine. Can we merge it? :-) |
OK, I have slightly changed it, now we have |
#10329 Include metadataLocales in /submissions/{submission…
Describe the issue
While working on migrating Publications to the side modal. I need to be able to configure the publication metadata forms correctly client side. For that I need supported metadata locales for specific submission.
Could we add following to the
api/submissions/{submissionId}
response?This would come from.
What application are you using?
OJS, OMP or OPS version 3.5
PRs:
The text was updated successfully, but these errors were encountered: