How can you add a scriptrunner scripted field to a transition screen

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2023

I have created a scripted field based on the content of a text field. This is to show information as read-only on a transition screen.

The field works and I can see it on the issue under Scripted Fields.

But it is not showing up as a field that can be added to a transition screen.

Is this possible?

Are there any other ways to show read-only info on a transition?

3 answers

0 votes
Michael Kornatzki
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.
April 9, 2024

@Fabio Racobaldo _Herzum_ 

In order to put an info on a trasition, my suggestion is to add an help text to a specific field through a script runner behaviour.

I have been using this solution for years but the problem is that the helptext is hidden when the validator checks for mandatory fields

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 9, 2024

Hey @Michael Kornatzki  try to use setHelpText method and not setError...

Michael Kornatzki
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.
April 9, 2024

That's not enough.

I use setHelpText but the text is hidden if click in the screen and there are mandatory fields which were empty. Then the errorText of the mandatory fields is displayed and the helpText is hidden.

 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2023

Yep, scripted fields don't appear on "edit" screens (screens that allow for issue data updates - create, edit, and transition)

You can use the Jira Toolkit message-for-edit fields to put static messages on transition screens, but the only way I can think of getting a dynamic message field on to a transition screen is to 

  • Create a standard custom-field for message display, probably plain text
  • Create a listener that populates it for each issue on any change (I'm assuming there's a change that needs to lead to an update of the message for the transition)
  • Create a post-function that overwrites the message if the user has accidentally changed the text field (if the listener won't pick it up)
0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2023

Hi @Tom Lister ,

a scripted field is a real time field calculated on an issue view so it can't be added on a transition view.

In order to put an info on a trasition, my suggestion is to add an help text to a specific field through a script runner behaviour.

Fabio

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2023

Thx @Fabio Racobaldo _Herzum_ 

I don't think behaviours would work on a a transition screen.

I may be able to build some sort of message field using automation.

Tom

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 9, 2024

Hey @Tom Lister validator works also on a transition screen

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events