Allow import/export of Subscription Settings and Substitution Rules

Issue #1164 resolved
Tony White created an issue

I work in a team and in multiple sandboxes, but we like to have all metadata for check-in to GIT. It would make things easier if we could export and import the selected metadata, substitution rules between people or projects.

Comments (4)

  1. Scott Wells repo owner

    Tony, you can do this today. In fact, I do so for my day job project. The subscription details and substitution/retrieval rules are stored in the .iml files. For example, here are the relevant stanzas from one of my .iml files:

        <facet type="IlluminatedCloud" name="Illuminated Cloud">
          <configuration>
            <option name="connectionName" value="<redacted>" />
            <option name="defaultSourceRootUrl" value="file://$MODULE_DIR$/src" />
            <option name="deploymentSubstitutionRules">
              <list>
                <SubstitutionRule>
                  <option name="filenamePattern" value=".*\.cls" />
                  <option name="substitutionPattern" value="(?i)([^/]{2})(@Deprecated)" />
                  <option name="substitutionText" value="$1//$2 - IC" />
                </SubstitutionRule>
                <SubstitutionRule>
                  <option name="filenamePattern" value=".*\.cls" />
                  <option name="substitutionPattern" value="(?im)^(@Deprecated)" />
                  <option name="substitutionText" value="//$1 - IC" />
                </SubstitutionRule>
              </list>
            </option>
            <option name="moduleContents">
              <ModuleContents>
                <option name="contentSelectionType" value="PACKAGE_XML" />
                <option name="manifest">
                  <Manifest />
                </option>
                <option name="packageXmlRelativePath" value="src/package.xml" />
              </ModuleContents>
            </option>
            <option name="retrievalSubstitutionRules">
              <list>
                <SubstitutionRule>
                  <option name="filenamePattern" value=".*\.cls" />
                  <option name="substitutionPattern" value="(?i)//(@Deprecated) - IC" />
                  <option name="substitutionText" value="$1" />
                </SubstitutionRule>
              </list>
            </option>
          </configuration>
        </facet>
    

    If you used a Selected metadata subscription you'd see those details where you see the empty <Manifest /> element above.

    You can read more about how to manage project config files in version control here:

    http://www.illuminatedcloud.com/support/faq#ProjectVersionControl

  2. Scott Wells repo owner

    Resolving this assuming/hoping that the previous comment provides sufficient detail, but I'm happy to answer additional questions here about how to get this working.

  3. Tony White reporter

    Yes that works, but is very manual... would be nice to have a safer way to do that. I am not sure some people are up to the task of doing that.

  4. Scott Wells repo owner

    Tony, I apologize but I'm not sure I follow. What aspects are very manual? We just add a new substitution rule or update our subscription, then check in the .iml file. It's easy to to diff changes, and all changes are made through the module config screens. Sorry if I'm missing something or if we're not talking about the same thing...

  5. Log in to comment