PCP: Order of Custom Fields in exported XML

Benu Gupta July 16, 2014

Hi,

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

0 votes
Answer accepted
José Marañón [Awnaba Software S.L.]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2014

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!

Benu Gupta July 20, 2014

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.

Regards

Benu.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events