class ProjectOperationDelegate extends java.lang.Object implements ProjectUpdateDelegate
| Type | Name and description |
|---|---|
com.atlassian.jira.rest.clientv2.model.ProjectComponent$AssigneeTypeEnum |
assigneeType |
java.lang.Long |
avatarId |
java.lang.Long |
categoryId |
java.lang.String |
description |
java.lang.Long |
issueSecurityScheme |
java.lang.String |
key |
java.lang.String |
leadAccountId |
java.lang.String |
name |
java.lang.Long |
notificationScheme |
java.lang.Long |
permissionScheme |
java.lang.String |
url |
| Constructor and description |
|---|
ProjectOperationDelegate() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
setAvatarId(java.lang.Long avatarId) |
|
void |
setCategoryId(java.lang.Long categoryId) |
|
void |
setDefaultAssignee(java.lang.String assigneeType)Sets the default assignee for the project. |
|
void |
setDefaultAssigneeToProjectLead() |
|
void |
setDefaultAssigneeToUnassigned()Sets the default assignee for the project to the project lead. |
|
void |
setDescription(java.lang.String description)Sets the description of the project. |
|
void |
setIssueSecurityScheme(java.lang.String name)Sets the issue security scheme for the project. |
|
void |
setIssueSecuritySchemeId(java.lang.Long issueSecuritySchemeId) |
|
void |
setKey(java.lang.String key)Sets the unique key for the project. |
|
void |
setLeadAccountId(java.lang.String leadAccountId) |
|
void |
setName(java.lang.String name) |
|
void |
setNotificationScheme(java.lang.String name)Sets the notification scheme for the project. |
|
void |
setNotificationSchemeId(java.lang.Long notificationSchemeId) |
|
void |
setPermissionScheme(java.lang.String name)Sets the permission scheme for the project. |
|
void |
setPermissionSchemeId(java.lang.Long permissionSchemeId)Directly sets the permission scheme ID for the project. |
|
void |
setProjectCategory(java.lang.String projectCategoryName)Sets the category of the project. |
|
void |
setSpaceCategory(java.lang.String spaceCategoryName) |
|
void |
setUrl(java.lang.String url)Sets the URL of the project. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Sets the default assignee for the project.
This method updates the default assignee configuration for the project. The default assignee determines who will be assigned to newly created issues in the project, unless explicitly specified.
This is a utility method for using with AssigneeTypeEnum from API responses
Valid Assignee Types:
Example Usage in Groovy:
// Update the project to set the default assignee to the project lead
Projects.getByKey("TEST").update {
setDefaultAssignee("PROJECT_LEAD")
// Update the project to leave issues unassigned by default
Projects.getByKey("TEST").update {
setDefaultAssignee("UNASSIGNED")
}
}
assigneeType - the default assignee typeSets the default assignee for the project to the project lead.
This method updates the project’s default assignee configuration, ensuring that newly created issues within the project are automatically assigned to the project lead unless explicitly overridden.
Example Usage:
Projects.getByKey("TEST").update {
setDefaultAssigneeToProjectLead();
}
Sets the description of the project.
This method updates the project’s description, providing additional context or details about the project. The description is a plain text field that is visible in the project's details page in Jira.
Example Usage:
Projects.getByKey("TEST").update {
setDescription("This project is focused on backend services.");
}
description - the new description for the project; can be plain text, or null to clear the descriptionSets the issue security scheme for the project.
This method configures the project to use the specified issue security scheme. Issue security schemes determine the visibility of issues within the project, allowing you to restrict access to specific users or groups based on predefined rules.
The method resolves the ID of the issue security scheme using RetrievalService.findIssueSecuritySchemeId. Ensure that the provided scheme name matches an existing issue security scheme in the Jira instance.
Example Usage in Groovy:
Projects.getByKey("TEST").update {
setIssueSecurityScheme("Confidential Issues Scheme")
}
name - the name of the issue security scheme to assign to the projectSets the unique key for the project.
The project key is a required field when creating a project. It uniquely identifies the project within
the Jira instance and is used as a prefix for issues (e.g., KEY-1, KEY-2).
If not provided during project creation, the request will fail with an error.
When updating a project, this method can be used to change the existing key. The new key must:
// Set a new key during project creation
Projects.create("NEW", "New Project") {
setKey("NEW")
// Update the key of an existing project
Projects.getByKey("OLD").update {
setKey("NEW")
}
} key - the new project keySets the notification scheme for the project.
This method assigns a notification scheme to the project. Notification schemes define how notifications are sent for specific events, such as issue creation or status changes, and who receives them (e.g., watchers, assignees, or reporters).
The method resolves the ID of the notification scheme using RetrievalService.findNotificationSchemeId. Ensure that the provided scheme name matches an existing notification scheme configured in the Jira instance.
Example Usage in Groovy:
Projects.getByKey("TEST").update {
setNotificationScheme("Default Notification Scheme")
}
name - the name of the notification scheme to assign to the projectSets the permission scheme for the project.
This method updates the project to use the specified permission scheme. The permission scheme determines who can access and perform actions within the project, such as viewing issues or managing project settings.
The method looks up the ID of the permission scheme by its name using the RetrievalService.
Ensure that the provided name matches an existing permission scheme in the Jira instance.
Example Usage in Groovy:
Projects.getByKey("TEST").update {
setPermissionScheme("Default Permission Scheme")
}
name - the name of the permission scheme to assign to the projectDirectly sets the permission scheme ID for the project.
This method updates the project to use the specified permission scheme by its ID. Permission schemes define who can access and perform actions within the project, such as viewing issues or managing settings.
Unlike setPermissionScheme(String), this method requires the ID of the permission scheme instead of resolving it from the scheme's name.
Example Usage in Groovy:
Projects.getByKey("TEST").update {
setPermissionSchemeId(10001L)
}
permissionSchemeId - the ID of the permission scheme to assign to the projectSets the category of the project.
This method assigns a project category to the project. Categories are used to group related projects for better organization and visibility in Jira. The method resolves the category ID from the given category name using RetrievalService.findProjectCategoryId.
Ensure that the provided category name matches an existing project category configured in the Jira instance. If the name is invalid or not found, an exception will be thrown.
Example Usage in Groovy:
Projects.getByKey("TEST").update {
setProjectCategory("Engineering")
}
projectCategoryName - the name of the project category to assign to the projectSets the URL of the project.
This method updates the project’s URL, which is typically used to point to an external resource or documentation related to the project. The URL should be a valid, fully-qualified URL.
Example Usage:
Projects.getByKey("TEST").update {
setUrl("https://example.com/project-documentation");
}
url - the fully-qualified URL to associate with the project; can be null to clear the URLGroovy Documentation