Project Mapping

Published Date: 26-03-2024

Read Time:

Watch Video

This helps users to map the Jira fields for every Jira Project separately (one by one). Let’s take you through how.

Step 1: From ‘Admin Settings’, click ‘Fields Configuration’ and subsequently click ‘Project Mapping’.

Step 2: Select a Salesforce object from the list including all standard and custom objects.

Note: We provide licenses based on the number of objects to be integrated. If an organization purchases 4 licenses, they can use those to integrate any four Salesforce objects with Jira.

Step 3: Select a Jira Project from the dropdown list.

Step 4: Based on the selected Jira project, a list of mandatory Jira fields will appear. You can edit the labels of the Jira fields. Only the names used in the labels for Jira fields will appear on the Jira Creation Page in Salesforce.

Step 5: You can also map the Jira fields with the Object fields (optional). In case a Jira field is mapped with an object field, then the Jira field will be prepopulated with the value of the object field while creating a Jira ticket.

Step 6: Target- It enables you to sync updates directly from cases to Jira tickets and vice versa. Users have to decide the type of syncing; i) Bi-Directional ii) Salesforce iii) Jira iv) None

  1. Bi-Directional: If selected, then any update done on Salesforce case fields will be synced to Jira ticket fields and Vice versa.
  2. Salesforce: If selected, any change/update in Jira ticket fields will be synced to the Salesforce case fields.
  3. Jira: If selected, then any change/update in Salesforce case fields will be synced to the related Jira ticket fields.
  4. None: If None is selected, the basic syncing between Salesforce and Jira will always be there.

Step 7: Read-only - Fields for which read-only is enabled cannot be edited in the Salesforce. Users can only view these fields.

Step 8: You can map additional Jira fields available in a selected Jira project and also have the option to mark the fields mandatory/required by checking the ‘Required’ box on the fields. The marked fields would require a value while creating a Jira ticket from Salesforce.

Note: Jira fields can be mapped to the Salesforce fields on the basis of the data type compatibility. For example, the Jira priority field (picklist) can be mapped to the case priority field (picklist) only. The compatibility of the fields is defined in the backend. Refer to the sheet below to know the fields’ compatibility.

Step 9: You can also decide the mapping of picklist values between Jira and Salesforce, which is applicable only for picklist type fields. To do this, click the option boxed in green as shown in the screenshot below.

Step 10: You can decide which Jira value should get selected on a particular Salesforce field value selection.

Step 11: To add a new mapping for a Jira field, click on the ‘Add’ button by giving a unique label to the mapping.

Step 12: You can update the basic details of mapping through the inline edit button and change the label. Or choose another Salesforce field to map with the Jira field. Click on the inline save button.

Step 13: Users can also use the common save button to save multiple edited mapped fields.

Step 14: Click on gear icon, to unlock further settings for respective fields.

Using record settings,

  1. Help Text: Type in a small description for the respective field to help end users better understand what this field is about. For more details refer to the document.
  2. Record Mapping: It is used to send the Salsforce Record links to Jira so that users can view the Salesforce details from Jira. For more details refer to the related document.
  3. View Mode: If this option is enabled, then the respective field will not be visible to the agents at the time of creating a Jira ticket. Once a Jira ticket is created, that field can be viewed on the detail page of the Jira issue.
  4. Show in Related List: If this option is enabled, then the respective field will be visible under the Related List.
  5. Name Linking: It is used to create relationships inside Salesforce from Jira. For more details refer to the related document.

For Other Salesforce Objects

In order to sync updates from Salesforce objects (other than case) to Jira, Jira To Salesforce or Bi-Directional, please follow the below steps as pre-requisite.

Note: We have used the Account as an illustration. Likewise, you can apply the same approach to other Salesforce Objects.
  1. Custom setting
    • Step 1. From ‘Setup’, enter ‘custom settings’ in the ‘Quick Find’ box and click on it from search results. Then click ‘SFjiraTarget_Triggers’.
    • Step 2. Click ‘Manage’.
    • Step 3. Click ‘New’ to add a new Record of Custom Setting.

  2. Create a Trigger
    • Step 1. In the Developer Console, click File | New | Apex Trigger. The New Apex Trigger window opens.

    • Step 2. Click “Submit”.
    • Step 3. Please make sure to update the event From Before Insert to After update.

      To

    • Step 4. Click Debug and then open Annonymous window and Copy the code.
      Copy
      Grz_Sf__Sinergify_Trigger__c sc=new  Grz_Sf__Sinergify_Trigger__c();
          sc.Name = 'AccountToJiraTrigger';
          sc.Grz_Sf__IsActive__c = true;
          insert sc;
    • Step 5. Once done Click on the “Execute Highlighted” Checkbox.
    • Step 6. Copy the code in Trigger which is already created.
      Copy
      trigger AccountTrigger on Account (before insert, After update) {
                                      Grz_Sf__Sinergify_Trigger__c Metdata = Grz_Sf__Sinergify_Trigger__c.getValues('AccountTrigger');
                                      if(Metdata!=null && Metdata.Grz_Sf__IsActive__c && Grz_Sf.CheckRecursive.caseFlag){
                                      Grz_Sf.TriggerFactory.createHandler(Account.sObjectType);
                                      }
                          }
    • Test Class

      Copy
      @isTest
      public class AccountTrigger_Test {
          @testSetup
          static void testData(){
              Grz_Sf__SFjiraTarget_Triggers__c sinergifyTriggers = new Grz_Sf__SFjiraTarget_Triggers__c(Name='AccountTrigger', Grz_Sf__ObjectName__c='Account');
              insert sinergifyTriggers;
              Grz_Sf__Sinergify_Trigger__c stc = new Grz_Sf__Sinergify_Trigger__c(Name='AccountTrigger', Grz_Sf__IsActive__c = true);
              insert stc;
              Account testAccount = new Account(
                  Name = 'Test Account',
                  Industry = 'Technology',
                  Type = 'Customer'
              );
              insert testAccount;
          }
          @isTest
          static void testMethod1(){
              Account accData = [SELECT Id, Name FROM Account LIMIT 1];
              accData.Name = 'Test New Account';
              update accData;
          }
      }
    • Step 7. Once done click “Save”.