How to set a Message in a Field?

I have a field, i.e. Customfield_1. Now when I select a value (example: Yes) from Customfield_1, I should get a Pop uo message. How do I do this please?

2 answers

This widget could not be displayed.

You'll need to write some code to do that.  Sounds like some javascript is needed, but I'm not sure you'll be able to do it all by injecting that into fields, you might have to write an add-on to support it.

I'd also recommend not doing it - humans don't like pop-ups that interrupt what they're doing.  Could you explain the use-case and maybe we can get you a better answer, or one that doesn't require code.

Lets say I have two fields, Customfield_1 and Customfield_2. Customfield_1 has Dropdown value "Yes and NO". When Yes is selected in Customfield_1, Customfield_2 will get the Auto Populated Value as "Public". So I want my users to make aware that Selecting Yes in Customfield_1 will give the value as Public in Customfield_2. Which means I want to tell my users that selecting Yes will keep the ticket accessible to the Public.

Ok, that's a horrible thing to do to a user with a pop-up.

I would

  • Install the Script Runner add-on
  • Install the JIRA Toolkit
  • Add a message-for-edit field to the screen (from the toolkit), with some text in it like "This issue is publicly accessible, strongly highlighted
  • Use Behaviours to change the drop-down values, AND hide the text field when the issue is set to be protected by the selection

A show/hide here will not break the users flow, unlike a popup

Is there a process to  directly do from the Behaviours or adding Initialiser function? I do not want to add the message directly into the field.

I don't understand the question.

Behaviours can do what I describe.

Below is my condition:

if(gov_data.getFormValue()=="18961")   

security.setHidden(false)

else    security.setHidden(true)

Here, Gov_Data and Security fields are System field and used by other projects. So I cannot add the message box in thos efield. I want to add the message from the script in Behaviro.

When Gov_data = 18961 which means Yes, Security will set the value as 'Public'.

Gov_data is not a system field, it's a custom field.  Behaviours can be project/issue specific though, it should handle that for you.

This widget could not be displayed.

Here is a solution I came up with to display the message in a Field when condition meet or success.

"XXX.setHelpText" is a magic word.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

168 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you