Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

The Behaviours plugin disables inline edit :(

Todd Wilson
Contributor
January 11, 2018

I thought I had a major breakthrough for my QA team when I discovered the Behaviours plugin has long been installed on our instance yet totally unused. Finally, I could populate the Description field of bugs with QA's Steps to Reproduce template!!

Alas, it appears that adding a Behaviour to a field disables inline editing of that field from the View Issue screen.

I would really really like to give Bug Descriptions a default value without having to sacrifice inline editing. How can I do that?

Jira 7.1.9 ScriptRunner 4.3.5

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 18, 2022

If you want to import a class into another script, the script file has to match the class name.

So try to rename update.groovy to Generator.groovy

Then you will be able to 

import sidebar.Generator
Generator gen = new Generator()
gen.collectData(...)

I see that your collectData method is static, this means you don't need to instantiate the class first:

import sidebar.Generator
Generator.collectData(...)
boris_samoylov
February 21, 2022

Thanks. It works for normal classes. What about nested classes? I have classes in my Generator script and I want to call one of the nested class methods. Generator.InnerClass.method() not working

PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 21, 2022

I don't think it's possible to access a nested class that is nested inside a script.

The nested class would only be available from inside the script itself.

So if you want your nested class to be available to other scripts, then it must be nested inside a proper groovy glass.

0 votes
Helmy Ibrahim _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 18, 2022

Hi boris_samoylov,

Your filename should be the same as your class name. So, you can update the filename to Generator.groovy and update the import to sidebar.Generator and it should work now.

I hope this helps!

Cheers,
Helmy

TAGS
AUG Leaders

Atlassian Community Events