Hi, I need a little help to build a script that does the following:
For a specific issue type, a custom field is required when this issue is closed.
Some background:
I'm new at JIRA and I'm not a developer, so any help is highly appreciated :)
I looked at this behaviour example and I think this will do the trick, however set to issue type instead of Resolution....any clue where I should start?
import com.atlassian.jira.issue.resolution.Resolution
def resolutionField = getFieldById("resolution")
def fixVersionsField = getFieldById("fixVersions")
def resolution = resolutionField.getValue() as Resolution
if (resolution.name == "Fixed") {
fixVersionsField.setRequired(true)
fixVersionsField.setHidden(false)
}
else {
fixVersionsField.setRequired(false)
fixVersionsField.setHidden(true)
}
There is no simple way to get the information you are requesting.
If you want to find out what code it is, you will first need to go to the classes folder located at
<JIRA_HOME>/scriptrunner/classes/ for example /var/atlassian/application-data/jira/scriptrunner/classes/ and try to find the db56710530ed3a3618d2b2858bf365b8.class file in there. (Please note, this class file name can always change)
Once you have located the class, you will need to de-compile using for example IntelliJ.
After the class file has been decompiled, you will need to compare it against your Groovy code to see which code is actually causing the problem.
I hope this helps to solve your question. :-)
Thank you and Kind regards,
Ram
Has your question been answered?
If yes, please accept the answer.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your help @Ram Kumar Aravindakshan _Adaptavist_ It turns out that my log collector was splitting the log lines improperly. I looked at the physical logs and they provided a URL to edit the failing item - and I was able to resolve the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.