Custom Field in Workflow Post Action

Using JIRA Suite Utilities (JSU) plugin, I am able to add a post-action to a workflow transition to set the value of a custom field. When I do this, it appears that the PCP export dumps out a field.name such as "customfield_10009" rather than what I had entered, "Job Number".

It looks like JSU uses a post action class name like "com.googlecode.jsu.workflow.function.UpdateIssueCustomFieldPostFunction", which gets into the export properly, but on the import it looks like it doesn't get hooked up. When I attempt to view the workflow transition's post actions, I get an error in my log (which I can provide if needed), and instead of something like this in the UI;

Set the Job Number field to 9SND

I get this;

Type: class
Class: com.googlecode.jsu.workflow.function.UpdateIssueCustomFieldPostFunction
Arguments:
field.value = 9SND
field.name = customfield_10009

A couple questions arise:

First, do you plan to support other JIRA standard plugins (like JSU)? The PCP looks very useful, but this will break it for me if not.

Second, there are other id's embedded within the export file for my custom workflow definition (custom steps and actions, for example, which do not depend on other Plugins). I suspect as I go further in testing that I will find a problem in getting these to link back up on import. This is just a heads up as to where I need to continue my testing, but none of that matters unless the first question is resolved.

3 answers

1 accepted

The problem with this configuration lies in the JSU plugin workflow extensions not being supported by Project Configurator plugin (PCP) at its current version. It supports conditions, post-functions and validators defined in standard JIRA. Being this way, PCP does not "realize" that JSU post action "update custom field" has a field argument that must be translated properly before loading it into another instance of JIRA.

With respect to your questions:

1) I will evaluate if it is possible to add support for JSU in PCP and post it, together with an estimated release date, in the next days.

2) The other id's embedded in the XML file are IDs for steps and actions. These are used internally as a reference within the workflow descriptor and are OK. They need not be changed.

I am glad you managed to find a workaround!

Project Configurator will add, in its next version, support for workflow extensions defined in Jira Suite Utilities.

See our blog post here.

Version 1.0.3 corrects the issue described here. Nice work José!

This plugin rocks!

Hello Mike,

Could you send me the workflow XML file as you can download it from JIRA, and the exported XML file with the project configuration that PCP dumps?

If it is more convenient, send it to support@awnaba.com.

Thanks for your interest in PC

Sent exports to support.

I was able to work around my immediate issue by importing two times. First time, I get all the custom fields, issue types, etc. In addition, I get a workflow with some bad pointers to some non-existent custom field IDs. I look up the correct (new) IDs for the custom fields I need in my workflow, and hand edit the xml with those. Then I delete the workflow, and workflow scheme, and import a second time. After that, the custom fields called out in the workflow are hooked up correctly.

I'll move on to testing my other concern of step IDs and transition IDs in the xml. These could have a similar issue with other custom steps/transitions having been installed via some other mechanism causing an ID conflict.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

166 views 0 5
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