I want to change the Solution field to "Done" when the workflow reaches status "Done". Should be an easy script, but I am new to Scriptrunner and not quite familiar with the scripting.
I know this could also be done in the workflow, but if the User moves a not finished issue to another issuetype with a finished status the solution do not changes. So I want to make a job that does this every night or a listener.
Thanks for your help.
Hi @IT Frastanz
You can find plenty of examples on the Script Library. Here is one sample script for updating the custom field value using a listener. You can also do this using a Scripted Postfunction but listener will work just fine as well.
You will need to add some logic in the code to incorporate your requirement related to move, where I guess you can check if the project of the issue changes or issue key changes.
Try some of the examples using the script library.