Package hudson.plugins.jira
Class JiraJobAction
- java.lang.Object
-
- hudson.plugins.jira.JiraJobAction
-
- All Implemented Interfaces:
Action
,ModelObject
@ExportedBean public class JiraJobAction extends Object implements Action
JiraJobAction is to store a reference to theJiraIssue
that represents work being done for aWorkflowJob
(branch or PR) belonging to aMultiBranchProject
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JiraJobAction.RunListenerImpl
-
Constructor Summary
Constructors Constructor Description JiraJobAction(Job<?,?> owner, JiraIssue issue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplayName()
String
getIconFileName()
JiraIssue
getIssue()
String
getServerURL()
String
getUrlName()
static void
setAction(Job job, JiraSite site)
Adds aJiraJobAction
to aWorkflowJob
if it belongs to aMultiBranchProject
and its name contains an Jira issue key
-
-
-
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 aJiraJobAction
to aWorkflowJob
if it belongs to aMultiBranchProject
and its name contains an Jira issue key- Parameters:
job
- to add the property tosite
- to fetch issue data- Throws:
IOException
- if something goes wrong fetching the Jira issue
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
-