Hi All,
Creating a linked issue doesn't use the original reporter field, instead it uses the user creating the linked issue as the reporter. How do I change this?
Cheers
Brad
Hi Brad,
By default, the reporter is filled with the logged in user. You can try writing a script listener that is triggered by the issue linked event and updates the reporter to the one from the linked issue. It will update the history record and send a notification to the new reporter.
For this you will need the script runner app installed and some basic development background in groovy.
Let me know if you need more help with that...
Cheers,
Tanya
@Tanya Gordon would you happen to have a script already written for this that you would be willing to share?
No, I'm sorry. I don't have something like that written, but I could share several guidelines:
This is the code to understand the issues on both sides of the link:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.MutableIssueimport com.atlassian.jira.issue.Issueimport com.atlassian.jira.issue.link.IssueLinkImpldef issueLink = event.getProperties().issueLink as IssueLinkImplMutableIssue sourceIssue = ComponentAccessor.getIssueManager().getIssueObject(issueLink.getSourceId())MutableIssue destIssue = ComponentAccessor.getIssueManager().getIssueObject(issueLink.getDestinationId())
Then you simply read the reporter from the sourceIssue and set it onto the destIssue (or vise versa, depending on the link you use) using the issue.setReporter() function.
Hope this helps...
It looks like you're new here. Sign in or register to get started.