Skip to content

Repository submission agreement auto-ticked, manager/admin can't edit metadata #4636

Description

@alainna

Describe the bug
The mandatory repository submission agreement box is pre-ticked during submission, meaning authors do not need to actively consent before submission. If a user unticks and reticks, Janeway still doesn't seem to recognise it. The submission goes through sans issue, but there are resulting errors: a Repository Manager or Admin can publish the item, but cannot edit its metadata.

Janeway version
1.7.4

To Reproduce
Steps to reproduce the behavior:

  1. Log into 1.7.4 Janeway Repository, e.g. https://dev.eartharxiv.org/ and start a new submission: https://dev.eartharxiv.org/repository/submit/start/
  2. Note that the submission agreement tick box has already been ticked:
    Image
  3. Complete the submission, note that it successfully submits.
  4. Using a Repository Manager or Admin account, go to the Repo Manager and access the new submission. Under Control, click Edit Metadata
  5. See error. Sentry: KeyError: 'submission_agreement'
  6. Return to Repo Manager, click a different new submission, and click Edit Metadata to confirm error message is same

Expected behavior
Authors would be made to actively express their consent to submission policies.

Repository Admin and Managers would be able to edit the item metadata

Comparison:

  1. Log into a 1.6.x Janeway Repository, e.g. https://stg.eartharxiv.org/ and start a new submission: https://stg.eartharxiv.org/repository/submit/start/
  2. Note that the submission agreement tick box has not already been ticked, which is the expected behaviour:
    Image

Additional context
perhaps related to this ?

        if self.admin:
            self.fields.pop('submission_agreement')
            self.fields.pop('comments_editor')

        # If using this form and there is an instance then this has
        # previously been checked as it is required.
        if self.instance and 'submission_agreement' in self._meta.fields:
            self.fields['submission_agreement'].initial = True

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions