Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to get issue entity property?

ATLN AVer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 12, 2019

when use JMWE, i can use

issue.getEntityProperty("wf-1st-last-assignee")

 to get the value of property "wf-1st-last-assignee".

automation for jira also can get the issue / user / project property.

I try follow code to get the issue entity property in ScriptRunner Script Console

import com.atlassian.jira.component.ComponentAccessor
ComponentAccessor.getIssueManager().getEntitiesByIssueObject("wf-1st-last-assignee", ComponentAccessor.getIssueManager().getIssueObject("BIZMM-92"))

but it return []

 

how to get issue entity property with ScriptRunner?

1 answer

0 votes
Pavel Pavlovsky
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2019

Hi @ATLN AVer,

In our case, we were searching for the ability to update (not get) issue property via script runner. And found a following way: 

def result = put('/rest/api/2/issue/' + issueKey + '/properties/' + propertyKey)        .header('Content-Type', 'application/json')        .body(propertyValue)        .asString() 

 so you have to actually point to specific issue property via REST notation

A full example description is here.

Sorry if not very relevant to your case, but still, might be helpful.

Cheers,

Pavel 

ATLN AVer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 14, 2019

thanks

but i's not work at for Jira Version (not cloud)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events