Need examples on how to use BeanShell scripts
Hello.
You gave no examples of using BeanShell scripts.
We hope that this opportunity can help us to archieve the goal: after changing field1(type:select) is ServiceDesk Problem ticket we need to send this selected value to corresponding fields field2 (select) for all Bugs in Jira Software which are linked to this Problem and has "lower" value in their select field.
We can't do such fields comparision by JQL because fields of type 'select' can't be compared directly.
Comments (4)
-
repo owner -
Thank you. Your code sample helped me a lot.
But now I’m stuck at next point: your app is executing my BeanShell code every time the issue changed .
I expected that it’ll run only when configured source field(s) is(are) changed.
I wanted to eliminate this useless runs by checking the issue changeLog for my source field prior to main code to skip the rest, but I can't.
I’m newbie in Java and I know how to do this with help of Groovy and “event” object with Script Runner.But how can I get changeLog to parse it for updated fields with BeanShell?
p.s. Can you reveal a plans of implementing groovy scripting in your app?
p.p.s. May be I should create a feature request too? Something like “Plugin should skip doing anything if IssueUpdated event have no signs of source fields changes“.
-
repo owner Hi!
“event“ object do not provided in scope for beanShell. But I injected this object to groovy script.
Can you reveal a plans of implementing groovy scripting in your app?
I already test new version with groovy module and plan to post the release next week.
May be I should create a feature request too? Something like “Plugin should skip doing anything if IssueUpdated event have no signs of source fields changes“.
I will think about this.
p.s. If you want to join testing try add-on from attachment
-
repo owner - attached sync-fields-8.0.8.jar
- Log in to comment
Hi!
beanshell code like Java:
I add support for groovy in nearest future