How to render html content in postfuntion name of jira workflow add-on?

I'm building a JIRA add on that contains some workflow post-functions. I want to customize the description UI when attempting to select a post function for a transition from the available choices. I know this can be done, because the Jira Workflow Toolkit plugin does just this by placing some HTML content after the description.

In the atlassian-plugin.xml, the workflow function is listed with a name key and a description key, like so:

<workflow-function key="abcdefg" name="Abcdef G" i18n-name-key="" class="jira.plugins.postFunctions.workflow.AbcdefGFactory">
  <description key="abcdefg.description">This is what Abcdef G does...</description>

There is a resource file also listed in the plugin xml that contains the previously mentioned keys, = Abcdef G
abcdefg.description = This is what Abcdef G does...

I have velocity templates for view and input, but those don't correspond to the view of selecting a post function for a transition. I can't seem to find a factory method that would over-ride that display either.

How can I tap into the rendering of that Name or Description field in the Add Post Function To Transition view?

1 answer

1 accepted

1 vote
Accepted answer

I found out that all I had to do was add a WebResource consisting of a javascript file with the right contexts. The javascript looks for my postfunction labels and adds the little bit.

In the atlassian-plugin.xml:

<webresource ...>
<resource name="..." type="download" location="js/doit.js"/>

Then the javascript file looks something like this:

AJS.$( document ).ready(function() {

function annotateWorkflowPostFunctions() {
var labels = AJS.$("label[for*='mykey']");
labels.each(function() {
$( this ).append(
'<span class="aui-lozenge aui-lozenge-error">By Mike</span>'

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

959 views 3 9
Read article

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