Possiblity of adding a custom tab under activity section in jira.

MRANJ May 8, 2024

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

3 answers

1 vote
Yuliia_Borivets__SaaSJet_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 8, 2024

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:

description changes jira data center.jpg

How to get it:

field filtering in history.gif

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.

0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 8, 2024

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:

2024-05-08 16_58_38-Script Fragments.png

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. 

0 votes
Collista Lewingdon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 8, 2024

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. 

Suggest an answer

Log in or Sign up to answer