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

[JENKINS-54578] Cannot delete last category #56

Merged
merged 4 commits into from
Dec 13, 2019

Conversation

aeoris
Copy link
Contributor

@aeoris aeoris commented Nov 18, 2018

It was impossible to delete all categories (neither at once nor one by
one), since when not receiving any categories, the last-saved categories
took precedence. This has been solved by initializing the categories
property when not receiving the categories from the configuration form.

It was impossible to delete all categories (neither at once nor one by
one), since when not receiving any categories, the last-saved categories
took precedence. This has been solved by initializing the categories
property when not receiving the categories from the configuration form.
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aeoris! Most likely it is better to update Jelly forms to prevent it, but it should work... Requesting the changes, because Hamcrest dependencies are not scoped to test

pom.xml Outdated Show resolved Hide resolved
@basil basil changed the title JENKINS-54578: Initialize categories when not received from form [JENKINS-54578] Cannot delete last category Dec 13, 2019
@basil basil merged commit 4bfc64f into jenkinsci:master Dec 13, 2019
@basil
Copy link
Member

basil commented Dec 13, 2019

Thanks for your contribution, @aeoris!

I just merged your PR with master and made a few edits:

  • Added a defensive null check in hudson.plugins.throttleconcurrents.ThrottleJobProperty.DescriptorImpl#getCategoryByName.
  • Rewrote the test to use org.jvnet.hudson.test.JenkinsRule#createWebClient rather than mocking. This results in more realistic testing against an actual Jenkins instance.

This should be a part of the forthcoming Throttle Concurrent Builds 2.0.2 release. Thanks again!

@basil basil added the bug label Feb 13, 2020
@basil
Copy link
Member

basil commented Feb 19, 2020

Released in Throttle Concurrent Builds 2.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants