Skip to content

Commit

Permalink
Updated example
Browse files Browse the repository at this point in the history
Added examples for adding a comment and using the transition issue
method.
  • Loading branch information
cfchris committed Feb 22, 2013
1 parent ef1e791 commit b7b28cc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,20 @@ See the [Jira Wiki](https://developer.atlassian.com/display/JIRADEV/JIRA+REST+AP
/* Create an issue in Jira. Include "External issue ID" custom field. */
newKey = jira.createIssue(
Summary = 'API TESTING',
Description = 'As a developer, I would hope this is posted to Jira.',
Description = 'As a developer, I hope this is posted to Jira.',
Assignee = 'REDACTED',
Reporter = 'REDACTED',
CustomFields = [{id = '10100', value = 'DP Ticket XXXXX'}]
CustomFields = [{id = '10100', value = 'Ticket XXXXX'}]
);
/* Add a comment to the newly created issue. */
newComment = jira.createIssueComment(
IssueKey = newKey,
Body = 'I hope this note shows up. That would be awesome!'
);
/* Close the issue */
jira.transitionIssue(
IssueKey = newKey,
TransitionName = "Close Issue"
);
/* Get full details of issue from Jira */
issue = jira.getIssue( newKey );
Expand Down

0 comments on commit b7b28cc

Please sign in to comment.