Forums

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

Autocompletion for custom classes / objects

Hauke Wollentin February 2, 2023

Hi all,

how do I need to update my classes or constructors to be more precise in the Script Consoles autocompletion?

I'd like to see at least the correct parameter name (in the picture shown it isn't int0, but 

objectTypeId for instance) and - if possible - some hints or documentation in that little textbox.

jira_custom_class.png

Thanks in advance,
Hauke

 

2 answers

1 accepted

0 votes
Answer accepted
Hauke Wollentin March 8, 2023

Turns out that this didn't need to be implemented by oneself. 

In - at least - Jira 9.6 with ScriptRunner 7.11.0 this has been implemented ❤️

Parameters name will now be shown as they are.

Screenshot (5).png 

1 vote
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
February 6, 2023

Hi @Hauke Wollentin

From the screenshot you shared, the ScriptRunner editor displays the correct parameters.

In the case you have provided, the ObjectType has only two types of constructors, i.e., an empty constructor and the constructor with the int type parameter.

Hence you can see the option 1/2, which stands for 1 of 2. So the first option displayed is the int type parameter, and the second is no parameter.

I hope this helps to answer your question. :-)

Thank you and Kind regards,
Ram

Hauke Wollentin February 7, 2023

Hi @Ram Kumar Aravindakshan _Adaptavist_ 

yeah there are two constructors in this class, so thats pretty ok for me.

But I'd like to have `int objectID` for instance instead of `int int0` in this little box (the actual parameter is called `objectID` and not `int0`).

This would give our users (and me :p) a better idea _what_ parameters are really needed.

For the default classes I also see a description text inside that small box; but I don't know how to achieve this kind of documentation (assuming that it isn't hard coded in ScriptRunner or the Editor itself).

Thank you,
Hauke

Suggest an answer

Log in or Sign up to answer