Forums

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

Get screen ID to use in a JMCF text (scripted) field

Reno May 16, 2022

Hello!

I have created a "Calculated (scripted) Text/Html Field" from the JMCF plugin.

This custom field is rendered in several transition screens and I want to use it to display a different text in each one of them. This text is meant as note/message for the user during the transition, so not editable. 

To do so, I want to get the screen Id it is rendered and use that info to decide which text to display. 

How can I do it?

Alternatively, how can I set the text of this field via a ScriiptRunner behaviour?

Thank you in advance for your help.

P.S.: I also tried using a common Jira text field (single or multiline) and making it display the text I want by a ScriptRunner Behaviour, though once I set the field as read-only, it is greyed out I'm not too fond of it. Also I'd like to be able to use HTML formatting, hence the use of this JMCF field.

Furthermore, I also looked into the Message CF option, but the plugin needed (Toolkit Plugin for Jira) is not available for the Data Center version that I use.

1 answer

1 accepted

0 votes
Answer accepted
Reno May 19, 2022

In case anyone is interested, I've contacted the plugins vendor and the short answer is NO. 

"""

I’ve checked with our team on this, and no, it’s not possible to get the current screen ID in JMCF fields since calculated fields are calculated in a global context, not for a particular screen. In fact, they are calculated in many contexts where there simply is no screen (e.g., re-indexing). This is not a use case for JMCF.

Alternatively, you might want to check Power Scripts app’s https://anovaapps.atlassian.net/wiki/spaces/PSJ/pages/1129382255/Live+Fields https://anovaapps.atlassian.net/wiki/spaces/PSJ/pages/1130233965/Live+Fields+Routines feature for your use case.

"""

Suggest an answer

Log in or Sign up to answer