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

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
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,154 views 5 10
Read article

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