Dominique Brice edited a comment on New Feature JENKINS-24641

Here are the two main differences I found between label-linked-jobs and better-labels.

1.
I included the description feature in the plugin. I didn't make it a separate section in the label configuration, because I don't see a reason to activate the Description link and not the Linked Jobs link.
It's nice to be able to add a description to a label but doing so via a plugin is a bit of an overkill from a usability perspective in my opinion. To have to click an additional link to see it is one too much click. The description field should be supported directly on the label page by core Jenkins, just like the description field on a job page.

2.
to list all jobs (to find the jobs linked to a particular label) I copied code from hudson.model.Label.getTiedJobs(), see getJobsGroups in this class. This function calls Jenkins.getInstance().getAllItems(AbstractProject.class). better-labels does the same. The different is that label-linked-jobs, like the jenkins core class, adds an additional filter by keeping only jobs implementing the interface hudson.model.TopLevelItem.
In the class/interface tree of Jenkins 1.580-SNAPSHOT only one non-abstract class extends AbstractProject : FreeStyleProject (via abstract class Project). Since this class also implements TopLevelItem, it makes no difference. However in Jenkins 1.532, there are more classes extending AbstractProject (they have since been taken to separate modules if I understand correctly), so the additional filter would indeed leave out some classes:

  • MavenModule, extends AbstractProject via AbstractMavenProject, does NOT implement TopLevelItem
  • MavenModuleSet, extends AbstractProject via AbstractMavenProject, implements TopLevelItem
  • MatrixProject, extends AbstractProject and implements TopLevelItem
  • FreeStyleProject, extends AbstractProject via abstract class Project, implements TopLevelItem
  • MatrixConfiguration, extends AbstractProject via abstract class Project, does NOT implements TopLevelItem

So better-labels would list the jobs from the following classes: MavenModule, MavenModuleSet, MatrixProject, FreeStyleProject, MatrixConfiguration while label-linked-jobs excludes MavenModule and MatrixConfiguration. I don't have enough knowledge of these two features in jenkins to determine if this is a problem or not.

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.

Reply via email to