Add-on:

Classic Connector for Salesforce & Jira

Question:

How do I show the total number of associated Salesforce.com Objects?

Answer:

This workaround requires a third-party add-on that is only available for JIRA Standalone and in some cases may even cause system instability.

This workaround is only provided as-is. ServiceRocket does not provide support for third-party add-ons so use this workaround at your own risk.


  1. Download and install the ScriptRunner add-on in your JIRA instance.
     

  2. Click on Cog Icon  > Issues > Custom Fields.
     

  3. Create a Scripted Field:

     
     

  4. Go to Cog Icon  > Add-ons > Script Fields.
     

  5. Edit the Scripted Field that you have create.
     

  6. Select the Number Field option as the template of the Scripted Field.
     

  7. Paste the following script into the Inline Script field:

    def val = getCustomFieldValue(<Remote System Reference field ID>);
    if (val == null || val.equals("")){
      return null;
    }
    def vals = val.toString().split(',');
    return vals.length;