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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Popping up a dialog or message box to give a warning but not blocking a workflow transition

There is a request to have a dialog box pop up warning a user to ask if they have done certain things. However they just want it to be a warning and not block a transition from one workflow state to another. I see validators or postflow functions that come with some of the plugins we have but they require a field to be populated or else they will block the transition. Is there something out there that I am potentially missing? We are on Jira 7.0.11 for server.

 

Thanks in advance.

4 answers

Hi Randy,

You can do exactly this with an add-on (for both JIRA Cloud and JIRA Server) called the "JIRA Toolkit Plugin".   It provides two very helpful field types called "Message Custom Field (for view)" and "Message Custom
Field (for edit)."

These fields allow you to display text or HTML on your issue or workflow transition screens. They particularity help to provide additional instruction, display a warning, or link to additional information.

To place a message on a view screen, use the "Message Custom Field (for view)" field type. To place a message on a create, edit, or transition screen, (which sounds like what you want) use the "Message Custom Field (for edit)" field type.

I add some nicely formatted HTML to make my message really stand out. I love this feature!

Hope this helps,

Rachel Wright

Hi @Rachel Wright

Unfortunately, when we add this sort of custom fields on the screen of transition it doesn't appear on the popin screen. Maybe because it's reserved for Edit or View screens..

 

Have you another solution

 

Many thanks

They're not "reserved", but the language in Jira-speak is a bit confusing here.

Jira's issue type screen scheme system talks about "View", "Create" and "Edit" screens for an issue type.  The fourth type of screen is a "Transition" screen.

However, the Jira Toolkit's message box field also uses "edit" and "view" to describe something underlying the Jira screens and they do NOT mean the same as the issue type screen scheme.

They actually mean "how the screen handles in a browser".  A "view" screen to the toolkit means "Putting things on the screen in a flat text/image format".  And an "edit" screen means "put fields in front of the user so they can change the data".

So... The view type message field only works on issue view screens.  The edit type message field only works on screens for data entry, which in Jira-speak is all the Create, Edit and Transition screens.

You say "when we add this sort of custom fields on the screen of transition it doesn't appear on the popin screen".  This will be down to a couple of possible mistakes we see all the time:

  • You've not put the text for the field in the default content box (a lot of people, especially me, put their text in the description - it's an easy mistake to make)
  • As described above - a transition screen is an "edit" screen, but you've used a "view" type message field.  Try putting an "edit" message field instead.
Like Pascal MALFOY likes this

Hi @Nic Brough _Adaptavist_

Thank you for your answer
I verified on my JIRA and you can see that :

- I used Edit Field Message

- I inserted the text in the default content box

CustomField.png

I added it in a transition screen

Screen.pngAnd the result, nothing appear in the popin information transition message...

Popin.png

(I reindexed JIRA but it doesn't change anything)

Many thanks for your help

Rachael beat me to it, and explained how to get there better, but I did say it before -

"You've not put the text for the field in the default content box (a lot of people, especially me, put their text in the description - it's an easy mistake to make)"

Hi Nic or Rachel, 

 

Going back to this original thread I started awhile back ago on Jira Toolkit Plugin. I recently saw this weird error when doing a bulk edit. All the Message Custom Field for Edit's are all lumped together on the Bulk Edit page. Since I have different messages for different screens, I don't believe this to be a screen issue. I am guessing this is not normal but wanted to confirm if this was just me or everyone else as well?

 

Thanks in advance for any enlightening advice you might have.

 

-Randy

Forgot to mention that this was happening in Step 3 of Bulk Operation when I click "Edit Issues". This was on Jira 7.0.11.

It is normal.  Bulk edit lists all the available fields, but doesn't look at how they work.  The message field for edit look like editable fields to the bulk edit, so it puts them in front of you.

Thanks Nic for that quick reply.

 

Is there any way not to show these on a bulk edit as it seems really confusing?

 

Thanks,

Randy

I'm afraid they can't be removed.  Bulk edit shows every edit field.

Just copy the HTML code on custom field description and set aui message type. See more on:

https://docs.atlassian.com/aui/7.9.3/docs/messages.html

 

<div class="aui-message aui-message-error">
<p class="title">
<strong>Error!</strong>
</p>
<p>And this is just content in a Default message.</p>
</div>
0 votes
Rachel Wright Community Leader Nov 15, 2017

Hi again Randy,

Your screenshot shows that you've added a value to the field's "Description" but that's different than adding information to the field's "Default" value. 

From the "Custom fields" Admin screen, choose the "Configure" option (not the "Edit" option.)  That's where you want to add your message and/or message formatting.

See screenshot.

default-value.png

And I love @Adaptavist Nic's explanation of "Edit" vs "View"!  :)  :)

Hi Rachel ! Many thanks, I understood my mistake ! It works ! Have a nice day !

 

@Nic Brough _Adaptavist_It was not so clear but many thanks. Default value is the good explanation.

 

BR

0 votes
Radek Janata Community Leader Jul 09, 2019

I've resolved this my own way. With Jira Toolkit custom fields I would have to have several custom fields for various transitions.

Since I guide users using transition descriptions, I've created a universal custom fields that always displays current transition description (if it exists) on the transition screen.

Steps

  1. create universal custom field - e.g. Transition Description Warning in my case (any type, I use simple text field)
  2. edit the custom field and add the code below to its description
  3. add the field to any transition screen where you want to display transition description
  4. add your own description in to your workflow transitions

Code (custom field description)

Don't forget to change this custom field ID in the code (#customfield_xxxxx)!

<script>
var transId = $(".jira-dialog.jira-dialog-open")[0].id.match("[0-9]+")[0] // getting transition ID
var transDesc = $("#action_id_"+transId)[0].title // getting transition title (description)

if (transDesc) {
transDesc = transDesc.match(".* - (.*)")[1] // getting second part from transition description
$("#customfield_14218").parent().parent().prepend('<div id="customWorkflowMessage" class="aui-message aui-message-warning"><p>' + transDesc + '</p></div>')
}

$("#customfield_14218").parent().css('display', 'none') // hiding this customfield
</script>

This works well on Jira 7.3, newer versions might require some customizations.

Later I've found out that this does not work when transitioning issues on board (workflow description/title is not available). And I haven't found any other way to display the warning when moving issues on boards - so no warning is displayed in this case :-(

Fixed JS code:

<script>
var transId = $(".jira-dialog.jira-dialog-open")[0].id.match("[0-9]+")[0] // getting transition ID
var transObj = $("#action_id_"+transId)

if (transObj[0]) {
var transDesc = transObj[0].title // if the description was found, get the transition title (description)
}

if (transDesc) {
transDesc = transDesc.match(".* - (.*)")[1] // getting second part from transition description)
$("#customfield_14218").parent().parent().prepend('<div id="customWorkflowMessage" class="aui-message aui-message-warning"><p>' + transDesc + '</p></div>')
}

$("#customfield_14218").parent().css('display', 'none') // hiding this customfield
</script> 

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

269 views 2 5
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you