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

Generated URN does not contain check number #6293

Closed
NateWr opened this issue Oct 20, 2020 · 11 comments
Closed

Generated URN does not contain check number #6293

NateWr opened this issue Oct 20, 2020 · 11 comments
Assignees
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users.
Milestone

Comments

@NateWr
Copy link
Member

NateWr commented Oct 20, 2020

Describe the bug
The URN should generate a check number that is calculated based on the URN. When the URN plugin is configured with a default pattern, the generated URN for an article does not include the check number.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Settings > Website > Plugins.
  2. Enable the URN plugin, open the settings, and enable the URN for articles. Set the required settings to anything and under URN Suffix, select "Use Default Patterns".
  3. Open a submission's workflow and make sure it is scheduled in an issue.
  4. Reload the submission's worklow and go to Publication > Identifiers.
  5. Click "Generate URN".

The URN follows the suffix pattern but does not include the check number. This is because it uses FieldPubId, which doesn't by default apply a check number. The URN plugin needs to extend FieldPubId or otherwise implement a solution that applys the check number when FieldPubId::generateId is called.

What application are you using?
OJS 3.2.1

Additional information
Reported in the forum.


PRs:

@NateWr NateWr added the Bug:1:Low A bug that does not have a severe consequence or affects a small number of users. label Oct 20, 2020
@NateWr NateWr added this to the OJS/OMP/OPS 3.2.1-2 milestone Oct 20, 2020
@asmecher
Copy link
Member

@NateWr, I'm drawing a bit of a blank on this -- do you have a reference for the check number calculation?

@NateWr
Copy link
Member Author

NateWr commented Jan 14, 2021

That's a good question! I did a quick search and couldn't find a specification for how to apply a check number either. I think URNs are used mostly in Germany. @bozana or @withanage do you know if URNs have a check number applied and where we might find documentation of how to generate that?

@withanage
Copy link
Member

withanage commented Jan 14, 2021

@NateWr

URNs have a check number (one digit ) applied as a suffix to the characters. I

I have found a PHP project which calculates the digit here.
https://github.com/bohnelang/URN-Pruefziffer

$purn is the check number, which should be added to a calculation.

I am not sure, if it should work for urns not registered in German national library, cause I remember slightly seing that it depdens on the registration agency.

@NateWr
Copy link
Member Author

NateWr commented Jan 14, 2021

cause I remember slightly seing that it depdens on the registration agency.

Uff... do you know anyone we can talk to learn more?

@bozana
Copy link
Collaborator

bozana commented Jan 14, 2021

Hmmm... I think I do not understand the problem here -- I do not understand why the number is not calculated/displayed -- will have to take a further look -- but:
There is the urn plugin setting "The check number will be automatically calculated and added at the end, as the last digit of an URN." that should be enabled for check numbers to be considered/calculated, and we also do calculate the number in https://github.com/pkp/ojs/blob/master/plugins/pubIds/urn/js/checkNumber.js (the link for the algorithm used is in there, but unfortunately DNB moved the URL) .
I am not sure if other national libraries need that number, but the German National Library does/did -- that's why the manager can configure it in the plugin settings.

@NateWr
Copy link
Member Author

NateWr commented Jan 14, 2021

Thanks @bozana, that helps! This issue has to do with the new pub id field in the publication area, which bypasses some of the previous pub ID stuff and does not call on checkNumber.js as it should.

@bozana
Copy link
Collaborator

bozana commented Jan 14, 2021

@NateWr, i have forgotten to say that there is also a function _calculateCheckNo in URNPubIdPlugin class that is/was used to add the number automatically (e.g. for default suffixes), and JS function was used for custom suffixes clicking on a button...

@bozana
Copy link
Collaborator

bozana commented May 10, 2023

@asmecher, could you take a look at the PRs above i.e. can we add these changes to the next stable release, that will need a new npm install and npm run build ?
Nate has already taken a look at the Vue components added/changed here in this issue: #8940. Thus they should be OK...

bozana added a commit to bozana/pkp-lib that referenced this issue May 10, 2023
bozana added a commit to bozana/ojs that referenced this issue May 10, 2023
bozana added a commit to bozana/omp that referenced this issue May 10, 2023
bozana added a commit to bozana/omp that referenced this issue May 10, 2023
@asmecher
Copy link
Member

@bozana, updating the JS will be fine for anyone using the .tar.gz distribution, but may affect git-based hosting if the JS isn't rebuilt. @mfelczak, does hosting tend to build the node dependencies when updating from one 3.3.0-x build to another?

@bozana
Copy link
Collaborator

bozana commented May 17, 2023

In our documentation in Notion it seems that node dependencies are build, but I am still not sure if I should merge the changes now... 🤔

@asmecher
Copy link
Member

I say yes. I'll send a reminder to Michael in advance of the release so when they update they can double-check.

bozana added a commit to bozana/pkp-lib that referenced this issue May 22, 2023
bozana added a commit to bozana/ojs that referenced this issue May 22, 2023
bozana added a commit to bozana/ojs that referenced this issue May 22, 2023
bozana added a commit to bozana/omp that referenced this issue May 22, 2023
bozana added a commit that referenced this issue May 22, 2023
#6293 fix checkDuplicate in PKPPubIdPlugin
bozana added a commit to pkp/ojs that referenced this issue May 22, 2023
pkp/pkp-lib#6293 consider urnCheckNo setting, fix checkDuplicate in PubIdPlugin
@bozana bozana closed this as completed May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users.
Projects
None yet
Development

No branches or pull requests

4 participants