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-32178] Fix broken links to branches from custom views #35
Conversation
Hmmm I need to think about this one |
Custom views are essentially broken, solely due to the override. Any old links referencing |
wouldn't a better option be to add a hidden action called |
I took another crack at it using an action as you suggested, completely replacing the previous implementation. The action is completely hidden as you suggest and will work with any override for The only problem I could find with this is shown in this screenshot, where an extra blank breadcrumb is added to the top of the page. |
eb51de0
to
6bd779b
Compare
Also I looked into using |
I think that is fixable. At the very least we could turn it into a temporary redirect to the correct URL since we just want to fix users browsing by clicking links so they should not have links to sub-elements. But I think there is another way that removes the breadcrumb also |
Well, the effect of the extra breadcrumb is visual only. It's not clickable and does not generate children. The children are already correctly listed by the view breadcrumb. I looked at the breadcrumbBar.jelly file and it does not appear there is a way to exclude the entry. I don't think an HTTP redirect for the user is the correct approach. It could make things unnecessarily complex or broken for the JSON/XML web APIs. |
Why not just get rid of the custom URL prefix override? Would fix everything and the only patch is deleting a few lines of code. |
That was the original patch but there was some debate from @stephenc |
I see. (Well, I do not see, since I guess you force-pushed a different commit, but I can imagine.) So @stephenc why do we care about preserving the custom URL prefix? Seems like it is much more of a hassle than it is worth. |
Correct, I did force push over it and seemed to have lost the commit to the sands of time. The original change was removing the prefix override and deprecating |
Because I would prefer to keep the semantic meaning. @jglick Ping me on Monday and we can discuss more |
In fact the current URL pattern breaks this too, which is causing me problems in jenkinsci/workflow-cps-plugin#12. Note that |
Could hardcode |
@jglick ok you won me over... reluctantly, but I'll accept us moving to job (though it would be much better if everyone could just move to |
624d1ab
to
97fa7fb
Compare
By removing the prefix override, links to the sub-projects on custom views will use the default "job", allowing the views' existing Stapler URL bindings to correctly load the page for the item.
Updated PR back to original change |
👍 |
Forgot about jenkinsci/branch-api-plugin#35.
JENKINS-32178