I've created a post function send notification via ScriptRunner, but the output formatting is less than desirable.
Everything within the script runs together, and for some of the fields, I see the URL for the fields.
Is there a way to prevent the URLs from showing?
Is there a way to format the output so it doesn't write in one blob (does HTML code need to be part of my script?)?
I did make one attempt to correct both problems based on another article in the community which is in my Primary Domain info.
My script:
def fields = get('/rest/api/2/field')
.asObject(List)
.body as List<Map>
"""The request ${issue.key}, requires an initial estimate by ${((List)issue.fields.customfield_10133)}.
Primary Domain: <%out<<issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Primary Domain"))%>
Applications: ${((List)issue.fields.customfield_10127)}
Business Requirements: ${issue.fields.customfield_10126}
Regards,
JIRA Team"""
Email Output:
The request CBE-8633, requires an initial estimate by [[self:https://mysite.atlassian.net/rest/api/2/customFieldOption/10139, id:10139, value:Accenture]]. Primary Domain: <%out<<issue.getcustomfieldvalue(com.atlassian.jira.component.componentaccessor.getcustomfieldmanager().getcustomfieldobjectbyname("primary domain?))%=""> Applications: [[self:https://mysite.atlassian.net/rest/api/2/customFieldOption/10307, id:10307, value:GEP - P2P]] Business Requirements: There is an issue in which the accounting codes aren't coming over correctly into Great Plains, I've attached a recording of the issue. Debbie Felix mentioned that this issue was already fixed for the CBI instance but, the issue is still happening in the CBT, CBV, and Retail instances. The CBI issue that was fixed was under ERO 10031, I've attached an email thread from Debbie discussing this ERO with the Accenture team. Regards, JIRA Team