PCP: Order of Custom Fields in exported XML


We are currently using this plugin to automate the release of project configuration changes to production. The XML is exported from DEV after the configuration changes have been applied and then imported into production as part of the release.

I had a query regarding the order in which the custom fields are exported into XML if the option below is chosen during export:

Filtering custom fields: Include only custom fields that are visible in any of the project screens or used in any scheme or workflow used by the projects.

The new custom fields are usually created in the order in which they have been exported, but they are not exported in the order in which they were created in DEV which is a bit annoying for integration with other applications since the integration is based in IDs for performance reasons.

Is there any specific order that is used to export the project related custom fields?

Thanks for you help.

Benu Gupta

1 answer

1 accepted

Hi Benu,

Yes, the export is always ordered. For custom fields, they are ordered first by "type" and then by "name", as they appear in the XML file. "Type" is the complete custom field type key as in "com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker". This order is always the same, regardless of choosing an option for filtering unused custom fields.

The order of items within the configuration file is documented in this page, under the section "Order in the XML configuration file".

Trying to replicate in both instances the same IDs for the same set of objects is quite difficult, and in some cases completely impossible (even controlling the order in which they are created). See this issue for a partial discussion on this subject.

May I suggest an alternative for your integration needs to solve this problem? For example, use a table that maps object names to IDs or use a two-step deploying scheme as described in the mentioned issue.

You are welcome!

Thanks for your help and suggestion Jose. Now that we know the order, we should be able to better control the changes in DEV before the release so as to not break any integration.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


245 views 0 6
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