Stacktrace When loading a configuration which references non existing projects

Scenario

* Create a project dump on one system

* Load the dump into a fresh JIRA instance (no config whatsoever)

Load fails because the dump references a project 'CAR' in the custom field context, which doesn't exist

com.awnaba.projectconfigurator.utils.errorhandling.XMLInputDataException: Found reference to non existing project with key: CAR
	at com.awnaba.projectconfigurator.jiraobjectfacades.FieldToolsImpl.getJiraContexts(FieldToolsImpl.java:1311)
	at com.awnaba.projectconfigurator.jiraobjectfacades.FieldToolsImpl.createFieldConfigScheme(FieldToolsImpl.java:1268)
	at com.awnaba.projectconfigurator.loaders.handlers.CustomFieldConfigSchemeHandler.createNewTargetFrom(CustomFieldConfigSchemeHandler.java:248)
	at com.awnaba.projectconfigurator.loaders.handlers.CustomFieldConfigSchemeHandler.createNewTargetFrom(CustomFieldConfigSchemeHandler.java:1)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler$1.createNewFrom(AbstractIntegratedHandler.java:179)
	at com.awnaba.projectconfigurator.loaders.core.AbstractSmartCreator.smartCreate(AbstractSmartCreator.java:13)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler.shallowCreate(AbstractIntegratedHandler.java:194)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler.createTarget(AbstractIntegratedHandler.java:152)
	at com.awnaba.projectconfigurator.loaders.core.AbstractTargetHandler.handleTarget(AbstractTargetHandler.java:91)
	at com.awnaba.projectconfigurator.loaders.core.CollectionMatcher.match(CollectionMatcher.java:27)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler.handleOneTypeOfSubordinates(AbstractIntegratedHandler.java:291)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler.handleSubordinateCollections(AbstractIntegratedHandler.java:276)

2 answers

1 accepted

Currently, the plugin does not create those projects referenced in custom field contexts. Instead, if it finds one that does not exist in the target, it aborts the load as you have seen. This behaviour is documented in https://awnaba.atlassian.net/wiki/display/PCP/Specific+information+for+some+object+types, in the section "Custom fields". The idea behind it was that the load process would only change a single project.

The workaround is to create before the load a project with key "CAR". This project need not have anything else, it is enough if it exists and has key "CAR".

There is a new feature request, that would have the plugin create automatically those projects used by custom field contexts at https://awnaba.atlassian.net/browse/PCP-24.

If you think this is a good idea, please vote it. Thanks!

An alternative would be to skip creating the context when the project doesn't exist ?

Yes, it would be an option. But it would break the rule that the configuration in the XML file is replicated in the target instance after the load, as the custom field would end with a different configuration. I think, that would require, at least, a previous warning to the user.

Do you like PCP-24? The idea is that it could be enabled/disabled by the user before the load.

This issue still apparent in the latest release. The project key is the project that I want to import. I have got around this by creating the project and then importing

See my answer at [https://answers.atlassian.com/questions/24657532]. This could be another version of the same problem.

Some additional info

INFO  11:31:01,707 Creating custom field Quote Comments of type com.atlassian.jira.plugin.system.customfieldtypes:textarea
INFO  11:31:01,710 [Custom Field Quote Comments] Creating configuration scheme Default Configuration Scheme for Quote Comments
ERROR 11:31:01,711 Load failed for reason: Found reference to non existing project with key: CAR
ERROR 11:31:01,711 Error context: [Custom Field Quote Comments]

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

182 views 0 4
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