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

Pipeline Config UI doesn't allow removal of material name #11511

Open
JeroenOortwijn opened this issue Apr 25, 2023 · 2 comments
Open

Pipeline Config UI doesn't allow removal of material name #11511

JeroenOortwijn opened this issue Apr 25, 2023 · 2 comments

Comments

@JeroenOortwijn
Copy link
Contributor

Issue Type
  • Bug Report
Summary

Once you give a material a material name, you can't remove it anymore.

Basic environment details
  • Go Version: 23.1.0 (16079-21e78c998e1eb35d8d489c1d3e3e9813dc18233a)
  • JAVA Version: 17.0.6
  • OS: Linux 5.4.0-147-generic
Steps to Reproduce
  1. Create a new material without a material name (SVN in my case)
  2. Notice that on the materials page, the name is equal to the URL
  3. Click on the material and click on advanced settings
  4. Fill something in the material name textbox
  5. Click save
  6. Click on the material and click on advanced settings and scroll all the way down
  7. Remove everything in the material name textbox
  8. Click save
Expected Results

It should close the dialog box and remove the material name.

Actual Results

The dialog box doesn't close, the scrollbar of the dialog box changes its size, but nothing else happens.
When you now scroll all the way up, you see the following notice:

Save failed. failed to save : Name is invalid. "" should conform to the pattern - [a-zA-Z0-9_\-]{1}[a-zA-Z0-9_\-.]*
Any other info

My pipeline suddenly stopped filling in the GO_REVISION environment variable (custom command echo %GO_REVISION% outputs %GO_REVISION%), so I tried to revert all the changes I had done but got stuck on reverting this.

It would also be nice if all error messages are always visible, independent of the position of the scroll bar.

@chadlwilson
Copy link
Member

chadlwilson commented Apr 25, 2023

If you are an admin or pipeline group admin on the instance and want to workaround this via the UI you can use Admin > Config XML and edit the underlying XML configuration for the pipeline directly.

e.g replace

      <materials>
        <git url="https://github.com/gocd/gocd" shallowClone="true" materialName="gocd" />
      </materials>

with the below, removing the attribute completely.

      <materials>
        <git url="https://github.com/gocd/gocd" shallowClone="true"/>
      </materials>

@chadlwilson chadlwilson changed the title Can't remove material name Pipeline Config UI doesn't allow removal of material name Apr 25, 2023
@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had activity in the last 90 days.
If you can still reproduce this error on the master branch using local development environment or on the latest GoCD Release, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.

@stale stale bot added the stale label Aug 12, 2023
@chadlwilson chadlwilson added no stalebot Don't mark this stale. and removed stale labels Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants