Reputation: 334
Basically I'm trying to predefine some values with URL by creating a web-item with link to CreateIssueDetails!init.jspa operation:
<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&pid=$issue.project.id&issuetype=27&lname=Defect&customfield_10056=$issue.getCustomField("customfield_10056").name&assignee=$issue.assignee.name&customfield_10011=$issue.getCustomFieldValue("customfield_10011")&customfield_10046=10248&customfield_10022=$issue.getCustomFieldValue("customfield_10022")</link>
</web-item>
Assume I have 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.
Upvotes: 0
Views: 2564
Reputation: 16541
You should extend AbstractJiraContextProvider
.
Example here:
And inside you web-item you can use the context-provider:
<context-provider class="com.example.plugins.tutorial.DueDateIndicator"/>
Upvotes: 0
Reputation: 1
You have to do this in 2 steps:
#set($customFieldObj = $customFieldManager.getCustomFieldObject("customfield_10056"))
"customfield_10056" is the field identifier.
And then:
$cutomFieldObj.getValue($issue))
It must work.
Upvotes: 0
Reputation: 6881
A web-item is defined in an atlassian-plugin.xml file, but you're expecting it to behave like a Velocity template file. I don't think that $issue will be expanded as you want, or is it?
Upvotes: 0