| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
⬇️ Install package: OJS / OMP 3.5 — or browse all Releases.
A generic plugin for OJS and OMP that lets a journal require the family name, the affiliation and the biography of every contributor of a submission — each one on its own — and refuse to let the submission be completed while any of them is missing. Whoever runs the journal can be left out of it, so an editor keeps the autonomy to record and to correct a submission that is still incomplete.
Developed and maintained by OJSBR. See the Credits & authorship section below.
| Application | Branch | Plugin release |
|---|---|---|
| OJS 3.5.x and OMP 3.5.x | stable-3_5_0 (default) | 1.1.0.0 |
The same package serves both applications.
The core already requires one author field this way — the competing interests statement, through Settings → Workflow → Metadata. This plugin is the same idea for two more fields, plus the gate at the end of the submission.
Settings → Website → Plugins → Required author metadata → Settings.
| Setting | Default | What it does |
|---|---|---|
| Family name (surname) | off | The family name is required whenever a contributor is saved, in the language of the submission. |
| Affiliation (institution) | off | The affiliation is required whenever a contributor is saved — in the submission wizard and in Edit contributor. |
| Biography summary | off | The same for the biography, in the language of the submission. |
| Do not let the submission be completed while a contributor is missing one of them | off | The Submit button is refused, and the contributors panel of the review step says who is missing what. |
| Journal managers and section editors are exempt | on | Those two roles are left out of the three checks above. An assistant follows the rule like everybody else. |
The first two settings decide what is asked for; the third decides whether an incomplete submission can still be completed. Requiring a field without the third setting still keeps the form honest: a contributor cannot be saved without it, but a submission whose contributors were recorded before the journal changed its mind is not blocked.
Three hooks, in the order the author meets them, and no core template is replaced:
The exemption is read once, from the roles the acting user holds in that journal (ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR), and honoured everywhere the plugin acts.
The required mark. Since 1.1.0.0 the mark is drawn on the label of each required field, in the language of the submission, by a style of the plugin's own and in the colour the application uses for every other required field. It is not done through the form's isRequired, and that is deliberate: a multilingual field marked that way is required by the browser in every language of the journal, which would stop a contributor from being saved with the family name or the biography given only in the language of the submission — and that is all this plugin asks for. (The affiliations field could not be marked that way either: the component of PKP 3.5 draws its own heading and does not even declare that property.)
One language, not all of them. The family name, the biography and the institution are required in the language of the submission, and in no other. The affiliation editor of the application offers the name in the other languages of the journal as well, and says how many are filled ("1 of 3 languages"), but adding an institution with a single language works and is all this plugin asks for.
What counts as missing. An affiliation entry with neither a name in any language nor an organization identifier (ROR) is not an affiliation; a contributor with no entry at all is missing it. A biography is missing when it is empty in the language of the submission once the markup is stripped — an empty paragraph, or the non-breaking space a rich text editor leaves behind, is empty.
Living with other plugins. This plugin only ever adds errors under its own keys, and returns Hook::CONTINUE, so it neither hides nor is hidden by another plugin on the same hooks. With OJSBR's orcidManualEntry enabled and both rules on, the author sees both reasons at once, not whichever ran last — there is a test for exactly that.
PHPUnit (tests/*Test.php, on PKP\tests\PKPTestCase): the plugin class against the installed PKP and its registry, that every imported class exists, the defaults of each setting, what counts as a missing affiliation (no entry, an entry with nothing in it, a name of spaces, an identifier alone) and as a missing biography (<p> </p> included), who is exempt, the keys the rules are hung on, and the 38 translations. From the OJS root:
lib/pkp/lib/vendor/bin/phpunit --configuration lib/pkp/tests/phpunit.xml --no-coverage "$PWD/plugins/generic/requiredAuthorMetadata/tests"The suite also runs against the database of the installation: a submission is created with a contributor who has neither field, the core's own validation of the last step is called, and each field has to be reported on its own — with the journal manager completing it anyway while the exemption is on, and held to the rule once it is off. The submission it creates is deleted, and the test skips itself where the installation looks like a live site.
Cypress (cypress/tests/functional/RequiredAuthorMetadata.cy.js, run by pkp-github-actions on every push): enables the plugin, reads and saves its settings form, then works through the REST endpoints the contributor form uses — a contributor with neither field refused with both errors, one with only the affiliation refused for the biography alone, one with both accepted, nothing held where the journal asks for nothing, the submission turned down by the very request the Submit button makes and let through once the journal stops asking, and the autonomy of whoever runs the journal. It works on an installation with no submission of its own: it creates one and deletes it, and puts the settings back as it found them.
Both suites are run by .github/actions/tests.sh, so a failure in either one fails the job.
Verified on OJS 3.5.0.3 and OMP 3.5.0.3 (29 unit tests and 7 browser tests on each), with the orcidManualEntry plugin enabled alongside it.
Tests are kept in the repository and are not part of the release package.
Generative AI (Claude Opus 5, by Anthropic) was used to write and run tests, improve the code and bring it in line with PKP standards. Every change is reviewed and tested by OJSBR, which is responsible for the published releases.
Issues and pull requests are welcome.
Distributed under the GNU GPL v3. See LICENSE and docs/COPYING.
Plugin genérico para OJS e OMP que permite à revista exigir o sobrenome, a afiliação e a biografia de todos os autores e coautores de uma submissão — cada um separadamente — e impedir a conclusão da submissão enquanto faltar algum. Quem administra a revista pode ficar de fora da exigência, de modo que o editor mantém autonomia para cadastrar e corrigir uma submissão ainda incompleta.
Desenvolvido e mantido pela OJSBR. Veja os Créditos e autoria.
| Aplicação | Branch | Versão do plugin |
|---|---|---|
| OJS 3.5.x e OMP 3.5.x | stable-3_5_0 (padrão) | 1.1.0.0 |
O mesmo pacote serve as duas aplicações.
O núcleo já exige um campo de autoria assim — a declaração de conflito de interesses, em Configurações → Fluxo de Trabalho → Metadados. Este plugin é a mesma ideia para mais dois campos, com o bloqueio no fim da submissão.
Instale em Configurações → Website → Plugins → Enviar um novo plugin, ou extraia a pasta em plugins/generic/ (ficando plugins/generic/requiredAuthorMetadata/). Depois ative Metadados obrigatórios de autoria na lista de plugins Genéricos.
Configurações → Website → Plugins → Metadados obrigatórios de autoria → Configurações.
| Opção | Padrão | O que faz |
|---|---|---|
| Sobrenome | desligada | O sobrenome passa a ser exigido sempre que um autor é gravado, no idioma da submissão. |
| Afiliação (instituição) | desligada | A afiliação passa a ser exigida sempre que um autor é gravado — no assistente de submissão e em Editar contribuidor. |
| Resumo da biografia | desligada | O mesmo para a biografia, no idioma da submissão. |
| Impedir a conclusão da submissão enquanto faltar em algum autor | desligada | O botão Enviar é recusado e o painel de contribuidores da etapa de revisão diz de quem falta o quê. |
| Gestores da revista e editores de seção ficam isentos | ligada | Esses dois papéis ficam fora das três conferências acima. O assistente de edição segue a regra como qualquer um. |
As duas primeiras opções decidem o que é pedido; a terceira decide se uma submissão incompleta ainda pode ser concluída. Exigir um campo sem ligar a terceira já mantém o cadastro honesto: o autor não é gravado sem ele, mas uma submissão cujos autores foram cadastrados antes de a revista mudar de ideia não fica travada.
Três hooks, na ordem em que o autor os encontra, sem substituir nenhum template do núcleo:
A isenção é lida uma vez, dos papéis que a pessoa tem naquela revista (ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR), e vale em todo lugar onde o plugin age.
O asterisco. Desde a 1.1.0.0 a marca é desenhada no rótulo de cada campo exigido, no idioma da submissão, por um estilo do próprio plugin e na cor que o aplicativo usa em todo campo obrigatório. Não é feita pelo isRequired do formulário, e isso é decisão de projeto: campo multilíngue marcado assim passa a ser exigido pelo navegador em todos os idiomas da revista, o que impediria gravar um contribuidor com o sobrenome ou a biografia preenchidos só no idioma da submissão — que é tudo o que este plugin cobra. (O campo de afiliações também não podia ser marcado assim: o componente do 3.5 desenha o próprio cabeçalho e nem declara essa propriedade.)
Um idioma, não todos. O sobrenome, a biografia e a instituição são exigidos no idioma da submissão, e em nenhum outro. O editor de afiliações do aplicativo oferece o nome nos outros idiomas da revista e informa quantos estão preenchidos ("1 de 3 idiomas"), mas incluir a instituição com um idioma só funciona — e é só isso que este plugin cobra.
O que conta como faltando. Entrada de afiliação sem nome em nenhum idioma e sem identificador (ROR) não é afiliação; quem não tem entrada nenhuma está sem. A biografia está faltando quando está vazia no idioma da submissão depois de tirar a marcação — parágrafo vazio, ou o espaço não separável que o editor de texto rico deixa, é vazio.
Convivência com outros plugins. Este plugin só acrescenta erro nas chaves dele e devolve Hook::CONTINUE: não esconde nem é escondido por outro plugin nos mesmos hooks. Com o orcidManualEntry ligado e as duas regras ativas, o autor vê os dois motivos ao mesmo tempo, não o último — e há teste exatamente para isso.
PHPUnit em tests/ e Cypress em cypress/tests/functional/ (rodado pelo pkp-github-actions a cada push), com os comandos da seção em inglês. A suíte roda também contra o banco da instalação — submissão criada com autor sem os dois campos, validação do núcleo chamada, cada campo cobrado por si, o gestor concluindo assim mesmo enquanto a isenção está ligada e preso à regra quando ela é desligada — e, no navegador, prova a recusa do contribuidor pelos mesmos endpoints REST do formulário e o bloqueio pela própria requisição do botão Enviar. Verificado no OJS 3.5.0.3 e no OMP 3.5.0.3: 29 testes de unidade e 7 de navegador em cada, com o orcidManualEntry ligado junto.
Os testes ficam no repositório e não fazem parte do pacote da release.
Foi usada IA generativa (Claude Opus 5, da Anthropic) para escrever e rodar testes, melhorar o código e alinhá-lo aos padrões da PKP. Toda mudança é revisada e testada pela OJSBR, que responde pelas releases publicadas.
Distribuído sob a GNU GPL v3. Veja LICENSE e docs/COPYING.
| Back | FazBrowse Home | New Git URL |