Get custom field value in web-item context

Sergei Mihhailov May 16, 2013

Basically I'm trying to predefine some values with URL.

<web-item key="has-defect" name="has-defect"

section="operations-operations">

<label>Has Defect</label>

<link linkId="issueaction-has-defect">/secure/CreateIssueDetails!init.jspa?ppid=$issue.id&amp;pid=$issue.project.id&amp;issuetype=27&amp;lname=Defect&amp;customfield_10056=$issue.getCustomField("customfield_10056").name

&amp;assignee=$issue.assignee.name&amp;customfield_10011=$issue.getCustomFieldValue("customfield_10011")&amp;customfield_10046=10248

&amp;customfield_10022=$issue.getCustomFieldValue("customfield_10022")</link>

</web-item>

Assume I hava an Issue with custom field "Some Custom Fied" value in it, is it possible get it's value from issue like I'm getting for example Assignee: $issue.assignee.

I've already tried : $issue.getCustomField("customfield_10056").value;

$issue.getCustomField("customfield_10056").name;

$issue.getCustomFieldValue("customfield_10056")

Thanks for your time.

1 answer

1 vote
Chaithra N
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.
May 16, 2013

Hi,

Can you try the below one.

$issue.getCustomFieldValue($customFieldManager.getCustomFieldObject("customfield_10056"))

This is how you get the Customfield value in any plugins(postfunction/ condition etc)

Sergei Mihhailov May 16, 2013

Nope, doesn't work. I think that there are no $customFieldManager object in web-item context.

Suggest an answer

Log in or Sign up to answer