Forums

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

Custom script picker custom field

Maciej Olszewski
Contributor
May 18, 2018

Hello guys,

I have few questions.
1. Is it possible to create scripted field which works as a picker for example i want list of all spaces in Confluence and you can pick one of them?
If no
2. Is it possible to to use script runner to affect custom field configuration? To achive 1.
If no
Do you know any solution to create dynamic picker field based on for example rest api call or sql query?

Thanks in advance,
Maciej O.

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -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 Leaders.
May 18, 2018

No.  Scripted fields show data that is calculated by the code behind them.

If you want a field to read its options from a database, use one of the "database field" add-ons that are in the marketplace (nfeed and database field are the two I've used, but I think there are others)

Maciej Olszewski
Contributor
May 19, 2018

Hello Nic,

Maybe this is possible to change custom field configuration via script?

Cheers,
Maciej

Nic Brough -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 Leaders.
May 19, 2018

You can write scripts that will change field configuration, but there is no way to change a field's code (the stuff that makes it a read-only element)

Maciej Olszewski
Contributor
May 21, 2018

Thank you Nic for help :)

Maciej Olszewski
Contributor
May 21, 2018

Can you tell me which classes can be used to change configuration of custom field?

Nic Brough -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 Leaders.
May 21, 2018

fieldManager is the starting point for configuring fields.

Bear in mind that configuring fields means changing visibility, renderer, searching and so-on.  It does not allow you to change field type or provided behaviour.

Suggest an answer

Log in or Sign up to answer