Forums

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

need a special custom field

Alexander Richter
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 2, 2018

Hi there,

i'm searching for a way, to create a customfield which uses checkboxes as a yes/no - option and if you choose "yes", there is an information (as a URL - link to Confluence) that tells you what is need to be done.

any ideas?

here a fast scribble to explain what i'm looking for.

02-05-2018 09-22-02.png

 

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 2, 2018

You could put the link in the field description, but it would be independent of the selection.

If that's not working for you, then you'll need some code.  The Behaviours part of the ScriptRunner App can do this sort of thing, but you can also hack in some javascript (not recommended though)

Alexander Richter
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 3, 2018

Can you tell me bit more about the scriptrunner behaviour part.

i looked up the documentation and tried a bit in our testing environment. I could paste a default value to my field, i.e. a link to confluence. But is it also possible to paste Information outside of a 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 3, 2018

No, fields are the only variables on a page, so they're the only thing you can amend.

With a Behaviour, you should be able to handle a dummy field (I'd use a url field rather than text)

By "dummy", I mean that you add a bog-standard custom field, placed on the edit screen below your radio-button.  Without any behaviours, the field would appear for the users, initially empty, and be enter-able.  

With behaviours, you should be able to pre-populate it with data and make it read-only, and hidden unless "yes" is selected in the other field.

Alexander Richter
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 3, 2018

Thanks Nic!

your suggestion sounds great, i'll try that one :-)

Alexander Richter
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 4, 2018

Hi Nic,

could you give me another hint?

i prefilled an URL field with a link an then tried to only show it, if the radio button has value "yes". But the URL field doesn't show in the view screen but only in the edit screen.

how has the condition look like to work?

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 10, 2018

Does the field have a value when you're trying to display it?   Jira will only show custom fields if they have content.

Alexander Richter
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 11, 2018

yes i prefilled it with an URL. And as it is shown filled in the edit screen, it should also be shown in the view screen

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 11, 2018

Sorry, but I don't understand the context of "prefilled" on a view screen.  There's either data in a field or there is not, and it doesn't change on view.

Suggest an answer

Log in or Sign up to answer