File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1362,6 +1362,24 @@ export default class JiraApi {
13621362 } ) ) ;
13631363 }
13641364
1365+ /** Update worklog from issue
1366+ * [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-worklogs/#api-rest-api-2-issue-issueidorkey-worklog-id-put)
1367+ * @name updateWorklog
1368+ * @function
1369+ * @param {string } issueId - the Id of the issue to update
1370+ * @param {string } worklogId - the Id of the worklog in issue to update
1371+ * @param {string } body - value to set
1372+ */
1373+ updateWorklog ( issueId , worklogId , body ) {
1374+ return this . doRequest ( this . makeRequestHeader ( this . makeUri ( {
1375+ pathname : `/issue/${ issueId } /worklog/${ worklogId } ` ,
1376+ } ) , {
1377+ method : 'PUT' ,
1378+ body,
1379+ followAllRedirects : true ,
1380+ } ) ) ;
1381+ }
1382+
13651383 /** Deletes an issue link.
13661384 * [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issueLink-linkId-delete)
13671385 * @name deleteIssueLink
Original file line number Diff line number Diff line change @@ -798,6 +798,11 @@ describe('Jira API Tests', () => {
798798 result . should . eql ( 'http://jira.somehost.com:8080/rest/api/2.0/issue/someIssueNumber/worklog/someWorklogId' ) ;
799799 } ) ;
800800
801+ it ( 'updateWorklog hits proper url' , async ( ) => {
802+ const result = await dummyURLCall ( 'updateWorklog' , [ 'someIssueNumber' , 'someWorklogId' ] ) ;
803+ result . should . eql ( 'http://jira.somehost.com:8080/rest/api/2.0/issue/someIssueNumber/worklog/someWorklogId' ) ;
804+ } ) ;
805+
801806 it ( 'deleteIssueLink hits proper url' , async ( ) => {
802807 const result = await dummyURLCall ( 'deleteIssueLink' , [ 'someLinkId' ] ) ;
803808 result . should . eql ( 'http://jira.somehost.com:8080/rest/api/2.0/issueLink/someLinkId' ) ;
You can’t perform that action at this time.
0 commit comments