Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. It will consider only those contexts which affect any of the projects being imported. The rest of contexts will be ignored, "as if" they were not in the configuration file. If there are contexts for several projects and some of them are being imported and others are not, the plugin will treat these contexts "as if" they applied only to the imported projects.
  2. For the contexts in the actual custom field, if any of them applies both to imported projects and other projects, it will be changed, so that it applies only to projects that are not being imported.
  3. The plugin will match contexts in the XML file to existing contexts in the actual custom field, based on the projects to which the contexts apply. The matched contexts will receive the configuration that was defined for them in the XML file.
  4. The global context, i.e. the one that applies to "the rest of projects not referenced in other contexts" has a special treatment, as any change to this context is likely to affect potentially many projects whose configuration is not being imported. If the configuration in the XML file implies that the global context is used by any of the imported projects and importing it would change the existing global context, the plugin instead will create a new context for the imported projects that require it, leaving the existing global context untouched.

 

Info
titleAn example

Imagine this case:

  1. The XML file contains a custom field with a context for projects P1 and P2 (suppose these are the project keys)
  2. The only project exported in the XML file is P1.
  3. The target instance has a context for that custom field that applies to projects P1, P2 and P3.
  4. The plugin detects that applying the configuration associated to that context, would require changes in the target instance (for example, the custom field is a select list and its options would be changed)

When "smart custom field contexts" is enabled, the plugin would detect that the change to those options would impact on projects P1, P2 and P3. P2 and P3 are not being imported, so the plugin will modify the contexts so that only P1 is affected by the changes. It would do this by:

  • Changing the existing context in the target to apply only to P2 and P3
  • Creating a new context that applies only to P1, that will have the new options
Note
titleHighly recommended...

If you are going to import a configuration with "smart custom field contexts" it is a very good idea that the XML configuration file was created with the option to filter custom fields not used by the exported projects. If you do not do it this way, you risk getting some custom fields configured especially for the projects in the XML file, even if they do not have anything to do with those projects.