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

Fix JENKINS-13242 - global settings always overriding husdonUrl #34

Merged
merged 1 commit into from Mar 30, 2012
Merged

Fix JENKINS-13242 - global settings always overriding husdonUrl #34

merged 1 commit into from Mar 30, 2012

Conversation

hajush
Copy link
Contributor

@hajush hajush commented Mar 30, 2012

Only overwrite the email-ext setting for Jenkins URL when the checkbox is marked. This doesn't matter if the email-ext for Jenkins URL is empty, but if it is non-null, without these changes - the non-null settings get used for all email content generation scripts as the ${rooturl}, since it fetches it directly from this class - ExtendedEmailPublisherDescriptor - without checking against the overrride setting.

@slide
Copy link
Member

slide commented Mar 30, 2012

Does this really do what you are expecting?

@hajush
Copy link
Contributor Author

hajush commented Mar 30, 2012

I've tested it and it performs what I think was the intent of the original design. If on startup the value is null or empty for the email extension override for jenkins url - it gets filled with the current jenkins url. So the empty value there is not preserved.

Before this change, if the email extension jenkins url is changed to something different than the hudsonUrl, but then the override is turned off - the overridden value continues to be used. Clearly broken. And not that easy to figure out how to fix for a user. My small change fixes that.

What it does now is if you turn off "override", then any value that was entered into the email extension jenkins url field will be overwritten if you turn override off and then save. It's not the most intuitive - but it fits with the original design that the field gets filled with the current hudsonUrl setting and is certainly a lot less code and design change.

slide added a commit that referenced this pull request Mar 30, 2012
Fix JENKINS-13242 - global settings always overriding husdonUrl
@slide slide merged commit bb8616f into jenkinsci:master Mar 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants