Get custom field value in web-item context

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

This widget could not be displayed.

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)

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

124 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you