Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,266
Community Members
 
Community Events
184
Community Groups

How to pop up alert box which contains new custom field based on the value of another field in Jira

Hi ,

I need some help with setting a field.

I have 2 'Multi Select List' custom fields say Field1 and Field2.

I want to pop up new field only when  'Field1= option a' and 'Field2= option p'

Currently I am able to get new field ( of type radio button) on create issue screen right below the 'Field1' and 'Field2' when the condition is met.

But I want to know if new field can be displayed as pop up ( for example alert window) instead of displaying field on create issue screen ?

If yes, Please let me know how we can achieve this ?

Thanks

Sushmitha 

1 answer

0 votes
Oday Rafeh
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.
Mar 27, 2023

Hi @Sushmitha ,

From my information, Jira didn't support this functionality.  

One possible workaround could be to create a custom web panel that will be displayed as a popup when the conditions are met. You can write a small JavaScript code to display a pop-up with the desired custom field when the user selects the specified options in Field1 and Field2.

Another approach could be to use a third-party app or plugin that provides popup alerts or notifications based on Jira custom fields. You can search for Jira apps in the Atlassian Marketplace.

I hope this helps! Let me know if you have any further questions.

Regards, 

Oday

Hi @Oday Rafeh ,

Thanks for your response. 

Do you have any sample scripts that I can use for writing JavaScript code to display a pop-up with the desired custom field when the user selects the specified options in Field1 and Field2 ?

Like Oday Rafeh likes this
Oday Rafeh
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.
Mar 28, 2023

Hi @Sushmitha 

Try this please: 

AJS.toInit(function() {
var field1 = AJS.$("#customfield_10000"); // replace 10000 with the ID of Field1
var field2 = AJS.$("#customfield_10001"); // replace 10001 with the ID of Field2
var popup = AJS.$("<div class='aui-popup'></div>");
var customField = AJS.$("<input type='text' name='customfield_10002' id='customfield_10002'/>"); // replace 10002 with the ID of the custom field you want to display in the pop-up

// function to check if the specified options are selected
function checkFields() {
if (field1.val() == "option a" && field2.val() == "option p") { // replace "option a" and "option p" with the values of the options you want to check
customField.appendTo(popup);
popup.show();
} else {
popup.hide();
}
}

// bind the checkFields function to the change event of Field1 and Field2
field1.change(checkFields);
field2.change(checkFields);
});

Suggest an answer

Log in or Sign up to answer