Hey guys, right now I'm trying to update the status of issue 'A' as the listener catches issue 'B' transitioning into 'In Progress'. Apparently the get method wasn't as simple as I thought, this is what I have so far:
//Getting issue 'B'
def updatedIssue = get("/rest/api/2/issue/" + issue.key)
.asObject(Map)
.body
//Isolating the status name, then linked parent maps
def issueStatus = updatedIssue.fields.status.statusCategory.name
def issueParents = updatedIssue.fields.issuelinks.inwardIssue
After getting NullPointerException errors, I printed out the status of the request and found that I was getting 404.
Not sure what to do here, I assume the listener script is being ran before issue 'B' is done updating.
Any further explanation on this matter and/or solutions would be greatly appreciated!
Update: Trying to perform a GET request was completely the wrong route. I was able to get the new status using the changelog variable, and the parents using the issue variable
def newIssueStatus = changelog.items.toString
and
def issueParents = issue.fields.issuelinks.inwardIssue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.