Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-25925

Cleanup policy criteria error if you enter a decimal rather than validate/disallow

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.29.0
    • Fix Version/s: 3.38.0
    • Component/s: Cleanup, UI
    • Labels:
    • Environment:
      Safari MacOSX
    • Story Points:
      2
    • Sprint:
      NXRM Neo Sprint 27

      Description

      I entered 3.1 into the last downloaded field when doing a cleanup policy which was not allowed before the React conversion and saved and got the below error in the nexus.log (a generic one on screen). It seems disallowing or validating would be preferable to the error so filing.

      Acceptance Criteria: 

      Add validation to Last Downloaded and Component Age fields to only allow positive integers ( >= 0 )and not decimals.

       

      2020-11-18 12:20:00,366-0500 WARN  [qtp2096298020-197] admin org.sonatype.nexus.siesta.internal.JsonMappingExceptionMapper - (ID d134672c-a1ad-4f4c-aee5-929157472284) Response: [400] '[ValidationErrorXO{id='criteriaLastDownloaded', message='Cannot deserialize value of type `java.lang.Integer` from String "3.1": not a valid Integer value'}]'; mapped from: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.lang.Integer` from String "3.1": not a valid Integer value
       at [Source: (org.eclipse.jetty.server.HttpInputOverHTTP); line: 1, column: 70] (through reference chain: org.sonatype.nexus.cleanup.internal.rest.CleanupPolicyXO["criteriaLastDownloaded"]
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tahir.awan Tahir Awan
              Reporter:
              jtom Joe Tom
              Last Updated By:
              Tahir Awan Tahir Awan
              Team:
              NXRM - Neo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title