Is there a way to populate the source ID in the Jira ticket summary field

Hi,

Is there a way to populate the source ID in the Jira ticket summary field, rather than the source name? Currently, we are populating the source name.

#foreach($req in $plan.requests) #if($req.operation == ‘Create’) Create account on $req.resource #elseif($req.items) #foreach($item in $req.items) #if($item.name == ‘disabled’ && $item.value == ‘true’) Disable account on $req.resource #break #elseif($item.name == ‘disabled’ && $item.value == ‘false’) Enable account on $req.resource #break #end #end #else $req.operation account on $req.resource #end #break #end

Hey @pkumar22! Sorry I don’t have a tenant right now to test this myself, but instead of having $request.resource you may be able to do something tricky like

reqApp = request.getApplication() 
and then: 
idn.getSourceAttributeBySourceName(reqApp, "id");

← hopefully get’s you the id so you can pass that instead.

I tried the two ways below, and it is populating like

Create account on source ID: $sourceId

#set($reqApp = $request.getApplication())
#set($sourceId = $idn.getSourceAttributeBySourceName($reqApp, 'id'))

#foreach($req in $plan.requests)
  #if($req.operation == 'Create')
    Create account on source ID: $sourceId
  #elseif($req.items)
    #foreach($item in $req.items)
      #if($item.name == 'disabled' && $item.value == 'true')
        Disable account on source ID: $sourceId
        #break
      #elseif($item.name == 'disabled' && $item.value == 'false')
        Enable account on source ID: $sourceId
        #break
      #end
    #end
  #else
    $req.operation account on source ID: $sourceId
  #end
  #break
#end
#foreach($req in $plan.requests)
  #set($sourceId = $idn.getSourceAttributeBySourceName($req.resource, 'id'))

  #if($req.operation == 'Create')
    Create account on source ID: $sourceId
  #elseif($req.items)
    #foreach($item in $req.items)
      #if($item.name == 'disabled' && $item.value == 'true')
        Disable account on source ID: $sourceId
        #break
      #elseif($item.name == 'disabled' && $item.value == 'false')
        Enable account on source ID: $sourceId
        #break
      #end
    #end
  #else
    $req.operation account on source ID: $sourceId
  #end

  #break
#end

Any help here? How to achieve this.