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.
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>
Hi Ricardo,
I am looking into you solution, but could you provide a few more steps.
I cannot seem to get it to work, I have a custom field of Checkboxes, and for the custom field description I have copied your HTML, however nothing shows up when I hover over the custom field on an issue, in view-mode. The field is present on the view screen.
Cheers,
Malene
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
I added it in a transition screen
And the result, nothing appear in the popin information transition message...
(I reindexed JIRA but it doesn't change anything)
Many thanks for your help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid they can't be removed. Bulk edit shows every edit field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
And I love @Nic Brough (Adaptavist)'s explanation of "Edit" vs "View"! :) :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.