Details
-
Bug
-
Status: Done
-
Low
-
Resolution: Done
-
None
-
SR4J Sprint 112
-
7.7
Description
Steps to reproduce
(scenario reproduced with Jira 8.9.1 and confluence 7.5.0)
- Create an application link between Jira and Confluence instance
- Create one or more script fields in jira
- On any confluence page add the macro "Insert Jira Issue/Filter"
- Add the script fields to be displayed on macro display options
- Once the macro is added the script fields data is not being shown
- In the screenshot below 2 script fields were added: "Date of First Transition" field show the string "$xmlutils.escapeForCdata($value.toString())" and "Custom Scripted Field" shows no data
Workaround
Create a Custom Script Field with the following configuration which will work the same as the Date of First Transition:
import com.atlassian.jira.component.ComponentAccessor // replace the issue status as you desired def issueStatus = "In Progress" def changeHistoryManager = ComponentAccessor.getChangeHistoryManager() def created = changeHistoryManager.getChangeItemsForField(issue, "status").find { it.toString == issueStatus }?.getCreated() def createdTime = created?.getTime() createdTime ? new Date(createdTime) : null
Attachments
Issue Links
- is related to
-
SRJIRA-5202 Scripted Field (Date of First Transition) exported as XML would show invalid value
-
- Done
-