Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a function to allow organization renaming #7

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions src/jira.js
Original file line number Diff line number Diff line change
Expand Up @@ -2089,6 +2089,27 @@ export default class JiraApi {
}));
}

/** Rename an organization.
* [Jira Doc](https://youtu.be/dQw4w9WgXcQ?si=RWwWdNwZ2xBfY9dI)
* @name renameOrganization
* @function
* @param {string} organizationId - The organization identifier.
* @param {string} name - The new organization name.
*/
renameOrganization(organizationId, name) {
return this.doRequest(this.makeRequestHeader(this.makeServiceDeskUri({
intermediatePath: 'rest/servicedesk/1',
pathname: `/organisations/${organizationId}/update`,
}), {
method: 'PUT',
followAllRedirects: true,
body: { newName: name },
headers: {
'X-ExperimentalApi': 'opt-in',
},
}));
}

/** Get Organizations
* [Jira Doc](https://docs.atlassian.com/jira-servicedesk/REST/3.15.1/#servicedeskapi/organization-getOrganizations)
* @name getOrganization
Expand Down
Loading