I'm looking to display a warning message to a customer if they select a certain value for a custom field.
An example use case would be: User selects "urgent" which will page an on-call engineer. We don't want to prevent the submission of the request, but we do want them to know the impact of that selection and verify if they're sure that's what they want to do.
Using a Scriptrunner behaviour, I was able to create a error message that displays for a field if a certain value is selected, however that blocks the submission of the ticket. The display for that is exactly what I'm looking to do though.
Update: I combined my original idea of a Scriptrunner behavior and Joseph's idea of custom help text for the field and it worked!
def cf = getFieldByName("Custom Field Name")
def cfValue = cf.getValue() as String
if(cfValue == "Yes"){
cf.setDescription("<p style=color:red><b>Desired Message</b>")
}
if(cfValue=="No"){
cf.setDescription("")
}
One possible solution is to create customized help text using wikimarkdown syntax on your request type form's field setup to instruct the users on your options associated to a field.
Here is an example -
We used the markdown syntax to create the help text to draw user's attention on the field entry.
In the Request Type form setup, here is the code -
Enter your project key in {color:red} *All CAPS* {color} in this field. {quote} *Example: Project is Incident Management, the project key will be "IM". You can identify your project key by looking at any issue key - "XXXXX-12
where {color:xxx}, * character is for BOLD font display, and {quote} is to create the coded block layout in the Request Type form in the portal.
Here is the link on Text formatting using wikimarkdown syntax - https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=texteffects
This should allow you to flag out the "Urgent" choice means to your customers.
Hope this helps.
Best, Joseph Chung Yin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the suggestion, @Joseph Chung Yin !
We're hoping for something to visually change when a certain selection is made. This is due to users' tendency not read the field descriptions if they've read them before.
This did make me wonder if there's a way to use a Scriptrunner behavior to conditionally set the field description, so I'm going to play with that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.