Hello there,
I am actually working on a specific need for my customer.
For a Projet = A, IssueType = Request and a specific CustomField toto = Iron, he want to display the CustomField EntranceDate in the resolution screen.
I decide to use a Behavior (threw Scriptrunner add-on) to develop this feature.
here is was i set:
i) I create a new behavior based on my customeField EntranceDate
ii) I set a mapping for my project A and issuetype = Request
iii) In my behavior setting i hide my customfield EntranceDate
iv) In my server script:
I test my CustomField toto liek this
if value = iron EntranceDate is unhide.
Actually i face an issue that in my server side script, i never retrieve my Customfield toto value, in my log is always a null return.
Please find below the server side script i used
def cfEntranceDate = getFieldByName("EntranceDate")
def cftoto = getFieldByName("toto ")
def totovalue = cftoto .getValue()
if ("Iron".equals(totovalue .toString()))
{
//action to do
}
I never reach the "//action to do" section.
Do you have any idea where i am wrong?
i also try to retrieve my Customfield EntranceDate with the ID, but nothing change.
I am pretty sure this is something stupide but i didn't get it.
I hope being clear enought to get understood :)
regards,
Olivier
Add the field toto to your behavior and add your script to the filed.
Hello Alexey,
thank for your answer.
i have 3 field in my behavior:
Resolution
Toto
EntranceDate
i have put the script on resolution field. My comprehension is when i do any change on resolution field, the script will be triggered.
Unfortunalty, thi is not working actually.
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
i found the solution.
i juste have my field in my screen and set it hide.
Like this i get the value i need for my behavior.
Regards,
Olivier
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.