Class JiraJobAction

  • All Implemented Interfaces:
    Action, ModelObject

    @ExportedBean
    public class JiraJobAction
    extends Object
    implements Action
    JiraJobAction is to store a reference to the JiraIssue that represents work being done for a WorkflowJob (branch or PR) belonging to a MultiBranchProject Any branches with the whole key in the name or after a prefix will have this action attached. e.g. "JENKINS-1234" and "feature/JENKINS-1234" will have this action with the issue JENKINS-1234 referenced
    • Constructor Detail

      • JiraJobAction

        @DataBoundConstructor
        public JiraJobAction​(Job<?,​?> owner,
                             JiraIssue issue)
    • Method Detail

      • getIssue

        @Exported
        public JiraIssue getIssue()
        Returns:
        issue representing the job
      • getServerURL

        @Exported
        @Nullable
        public String getServerURL()
        Returns:
        url of the Jira server
      • setAction

        public static void setAction​(@NonNull
                                     Job job,
                                     @NonNull
                                     JiraSite site)
                              throws IOException
        Adds a JiraJobAction to a WorkflowJob if it belongs to a MultiBranchProject and its name contains an Jira issue key
        Parameters:
        job - to add the property to
        site - to fetch issue data
        Throws:
        IOException - if something goes wrong fetching the Jira issue