Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49906

Form validation considers the rename "no op" to be an error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      Currently just going to the /job/whatever/confirmRename form results in a form validation error: "The name whatever is already in use".

      Instead this should be an informational message about this being the current name, or something like that.

       

        Attachments

          Issue Links

            Activity

            Hide
            dnusbaum Devin Nusbaum added a comment - - edited

            Daniel Beck what do you think about just leaving the name blank by default on that page? You'd still get an error ("No name is specified"), but since you have to pick something for the new name anyway that doesn't seem like a problem.

            I can also improve the error message in the case where the name is the same as before to "The new name is identical to the current name".

            EDIT: I should clarify, do you think renaming to the same name should succeed as a no-op, fail, or do something else?

            Show
            dnusbaum Devin Nusbaum added a comment - - edited Daniel Beck what do you think about just leaving the name blank by default on that page? You'd still get an error ("No name is specified"), but since you have to pick something for the new name anyway that doesn't seem like a problem. I can also improve the error message in the case where the name is the same as before to "The new name is identical to the current name". EDIT: I should clarify, do you think renaming to the same name should succeed as a no-op, fail, or do something else?
            Hide
            danielbeck Daniel Beck added a comment -

            I expect that it is rather likely that new job names will be similar to old job names, so would keep the default value to make minor changes easier. If you could detect it's the current job's name, just showing nothing, or an info message "same name" would be useful.

            EDIT: I should clarify, do you think renaming to the same name should succeed as a no-op, fail, or do something else?

            Not sure. Either could work. Since form submission that would change nothing is unlikely to be intended, it should probably remain an error.

            Show
            danielbeck Daniel Beck added a comment - I expect that it is rather likely that new job names will be similar to old job names, so would keep the default value to make minor changes easier. If you could detect it's the current job's name, just showing nothing, or an info message "same name" would be useful. EDIT: I should clarify, do you think renaming to the same name should succeed as a no-op, fail, or do something else? Not sure. Either could work. Since form submission that would change nothing is unlikely to be intended, it should probably remain an error.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            It feels wrong to me to not show a message or to have an info message if it causes an error during submission. Would you be ok with just changing it from an error to a warning, and making the message more specific, or do you feel strongly that there should be no warnings or errors when the page is opened?

            Show
            dnusbaum Devin Nusbaum added a comment - It feels wrong to me to not show a message or to have an info message if it causes an error during submission. Would you be ok with just changing it from an error to a warning, and making the message more specific, or do you feel strongly that there should be no warnings or errors when the page is opened?
            Hide
            danielbeck Daniel Beck added a comment -

            Warning (or unstyled info) would be fine, but it needs to be more specific than "name already taken". "Please specify a different name than the current one" or similar perhaps.

            Show
            danielbeck Daniel Beck added a comment - Warning (or unstyled info) would be fine, but it needs to be more specific than "name already taken". "Please specify a different name than the current one" or similar perhaps.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The patch has been integrated towards 2.111

            Show
            oleg_nenashev Oleg Nenashev added a comment - The patch has been integrated towards 2.111
            Hide
            danielbeck Daniel Beck added a comment -

            This UI is not in 2.107.x.

            Show
            danielbeck Daniel Beck added a comment - This UI is not in 2.107.x.

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                danielbeck Daniel Beck
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: