Hi All,
Hope you are having a great time.
I have come across a strange requirement.
Requirement :
When user is editing a text field, it is required that the history gets preserved. However, it is getting presrved under Activity section but as it contains all the information . So, it is hard to filter out just for one field.
Is it possible to create a specific tab for a custom text field under 'Activity' Section
Hi @MRANJ
The option of custom history reports is implemented by my team for Issue History for Jira.
You can choose any field and filter changes for it. Here is an example for the description text field:
How to get it:
It's possible to get the report for one issue under Activity section and for multiple issues in the main app's menu.
The app is available for Data Center and Cloud users. There is free 30-day trial. You're welcome to book a demo if you have any questions.
As seen in this response it is not possible to add a tab to the Activity panel using scriptrunner.
You would need to build a plugin using the SDK.
However, it would be possible to create an entirely new panel (above or below the activity panel) to display a filtered view of the history details for a specific field.
The Scriptrunner Web Panale Fragment would look something a bit like this:
And then you can have the following in the Provider class/script:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import groovy.xml.MarkupBuilder
def fieldXName = 'description'
def chm = ComponentAccessor.changeHistoryManager
def issue = context.issue as Issue
def fieldXChangeHistories = chm.getChangeItemsWithFieldsForIssues([issue], [fieldXName]).findAll { it.changeItemBeans }
def builder = new MarkupBuilder(writer)
builder.table(class: 'aui') {
thead {
tr {
th 'Date'
th 'Changed By'
th 'Before'
th 'After'
}
}
tbody {
fieldXChangeHistories.each { ch ->
tr {
td ch.timePerformed
td ch.authorObject.name
td ch.changeItemBeans[0].fromString
td ch.changeItemBeans[0].toString
}
}
}
}
My example uses the "Description" field's history for testing. Change it as necessary to get a different field.
You might also need to fiddle with the output to get it formatted nicely.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good morning @MRANJ ! I do not personally know how to do this but was able to find another question that covered this topic. https://community.atlassian.com/t5/Jira-questions/How-can-you-add-a-tab-under-the-Activity-Section/qaq-p/854501
It does appear that you will need the help of a developer to do this but Atlassian does have a guide that is referenced in the above response. Issue Tab Panel
If my response helps you come up with a resolution please select it as the accepted answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.