How to create Javascript alert message with custom field value validation?

I have a custom field checkbox named ‘Engineering’ and values ‘Requested’ and ’ Not Requested’. When doing ‘Ready for Dev’ workflow transtion button user must have to select ‘Request’ or ‘Not Request’ checkbox on Edit screen.
If these checkboxes are empty, pop alert message should come before opening workflow transition window and prevents opening workflow transition screen.
if these checkboxes are not empty, pop alert message should not come. It will open transtion screen without any exception.
I tried workflow validation but it didn’t work me as I expected, for that I have built plugin to validate these custom fields through JavaScript.
Can any one help me please…
Any help would be appreciated.
Thanks in advance.

Why didn’t a validator work? Because it occurs after the form is filled in and submitted? Maybe what you really want is a condition that prevents the transition in the first place.

Hi Justin,

I really appreciate your quick reply.

The problem is there are more than 10 fields on the transition screen. User will get frustrated after they entered all fields and get an error message and also those check boxes we will not be provided on the transition screen.

It will be like a “I read all the terms and condition” check box before we going to click “New Registration” button.
Clicking “New Registration” button without checking check box will show an alert message and it will force to check checkbox.

Use a condition so the button that performs the transition doesn’t show when none are checked. create a web item to show a button in the same location with a condition that shows the button when none are checked. so opposite conditions only one shows at a time. they should have the same text. use javascript with the dummy button that displays your message pop up. when they edit the fields the buttons should switch.

This is very similar to: “How to display an info message on a transition screen based on value in customfield?

Hi Justin,

I am new to Jira development don’t no how to create web item.
would you please give me step by step details.


See Modify the Plugin, part of Atlassian’s Getting Started guide.

    <web-item key="dummy-workflow-item" name="Dummy Workflow Item" section="transitions-all" weight="100">
        <tooltip>A dummy workflow item</tooltip>
        <link linkId="dummy-workflow-item">