Hi Community,
Is there any possibility that parent link custom field shows the summary of parent key as well with parent key while exporting it into .csv format. however it is showing summary as well in .html format.
Hi @Naman Jain
Not natively, in a CSV file it only includes the "Parent Link" issue key.
There's other options though - for example...
Once the metadata is available for the child issues in your search, you could then add the field as a column and export it via CSV
Ste
@Naman Jain
We accomplished this with a ScriptRunner Listener that fires on Issue Created and Updated Events. Probably needs to fine tuning as it's kind of overkill, but this should work for you. Our custom field variables are named portParentLinkKey & portParentLinkSummary. You should be able to grab the Summary of your Parent Link issue and populate it in another field using this code.
I'm on Jira DC - 8.20
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.CustomFieldManagerimport com.atlassian.jira.issue.MutableIssueimport com.atlassian.jira.issue.Issueimport com.atlassian.jira.issue.util.DefaultIssueChangeHolderimport com.atlassian.jira.issue.ModifiedValueimport com.atlassian.jira.issue.index.IssueIndexingService//the issue that was created, ie. any jira issue that is createddef issue = event.issue as MutableIssue//the Component Accessor class provides static methods for accessing JIRA's managed componentsdef customFieldManager = ComponentAccessor.getCustomFieldManager()def issueManager = ComponentAccessor.getIssueManager()def portParentLinkKey = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectsByName("Portfolio Parent Link Key")[0]def portParentLinkSummary = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectsByName("Portfolio Parent Link Summary")[0]def changeHolder = new DefaultIssueChangeHolder()def issueIndexManager = ComponentAccessor.getComponent(IssueIndexingService)//access the Parent Link Fielddef parentLink = customFieldManager.getCustomFieldObjectsByName("Parent Link")[0]//the value of the Parent Link fielddef parentLinkValue = issue.getCustomFieldValue(parentLink) as String//if the parent link field is empty, exit the scriptif (parentLinkValue == null) { log.debug "Parent link is null: Exit script" return} else { log.debug "Parent Link field's value = " + parentLinkValue def parentIssue = issueManager.getIssueByCurrentKey(parentLinkValue) def key = parentIssue.getKey() def summary = parentIssue.getSummary(); log.debug("Parent Link Key = " + parentLinkValue + " Parent Issue Summary: " + summary + " Parent Issue Key = " + key) portParentLinkSummary.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(portParentLinkSummary),summary),changeHolder) portParentLinkKey.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(portParentLinkKey),key),changeHolder) issueIndexManager.reIndex(issue) }
It looks like you're new here. Sign in or register to get started.