Hi all,
I am very new to jira and has not even used scripts uptil now. I need to use the Script fields. i had installed it on jira, but I am facing problem in using it. to use thescript fields, I need to write a script and fill up this(shown in the picture). can anybody help me with this? what should be there in script file path, script, tempalte etc....
I'm not sure what the confusion is.
You need to write a script that does what you want. (We can't start on that, as we don't know what you want). Once you've written it, you need to tell Jira how to get to it. Either upload it as a file and use the "script file path" to tell Jira where it is, OR you write it in the "Script" field.
The template, as per docs, is the text the field will output, using the results from the script.
Hi,
I want script field to have the value "true" when assignee = reporter and "false" otherwise. can i have the script for this one?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your script should look something like:
return (issue.getAssignee().getName().equals(issue.getReporter().getName()))
and your template
$!value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
I did the following and in the script testing for a issue it was returning the correct value. But the field was not working in the issue navigator. I tried reindexing then. jira was unable to reindex and was showing the error because of the scripted custom field i had created. I deleted the custom field and reindexed. when i created the field again then it was not even showing any value in the script testing for an issue. Tried reindexing and was showing the same error. is there any problem or incompatibility of the script field created on jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Daniel's script is broadly correct but doesn't take into account when there is no assignee, which is probably what is blowing up your indexing (NPE).
The script should just be:
issue.assignee == issue.reporter
However I would not waste a script field on this... you can use script runner's JQL functions to query on this, eg:
issuefunction in expression("", "assignee == reporter")
See https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-expression(Subquery,expression)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Unless you explain what you want the field to do, we can't really help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.