|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

I had a look at Label.getTiedJobs(), Label.getTiedJobCount(), Computer.getTiedJobs(), and it seems fairly simple to get this behavior. Today the condition is based on Object equality between the Label (tag) itself and the Label assigned to a project. By changing this condition to a string matching, we get what's requested above:
private boolean isProjectTiedToLabel(AbstractProject<?,?> p) { // original method of comparison. As a result would not see a project // with constraint "macos&&jdk7" tied to label "jdk7" // return (p != null) && (this.equals(p.getAssignedLabel())); String projectLabel = p.getAssignedLabelString(); return projectLabel != null && projectLabel.contains(this.name); }
Before proceeding further, I would like to discuss the functional implication of this change.
With this simple approach, any project related somehow to this label (or node) would be displayed, mixing together projects tied specifically to this label and those tied via elaborate conditions. One would have to go to each project's settings to see the exact reason why it's listed here. So a more complex display could be built to group such projects by categories, basically by distinct labels found (for instance: all "master&&macos" together, all "jdk7&&macos" together, all "macos" together", on the page related to "macos" label). That could become quite complex, so delegate to a plugin?
Now back to jenkins-core, we could keep it simple and indeed implement what's proposed above. The only functional change would then be that a Label (or Node) page would list all projects that have a restriction containing that tag (or slave), instead of being equal to it. Is that acceptable for the community?