Is there a way to delete some of the history from a Jira Service Management ticket (personal data)?

Joe Pakenham March 31, 2021

Background: We are planning to expand our Service Desk to include services that will have to occasionally capture address details of our staff.

We've agreed that this should only be temporary so that the information is only kept for as long as necessary, following GDPR.

Our first thought was to auto-delete the field upon ticket closure, however this information would remain in the ticket history. 

We also thought about using attachments to contain the address details, The history would still show that an attachment had been deleted but not include the contents of the attachment. However, this isn't particularly user-friendly. 

Are there any other ways this could be done, preferably avoiding a marketplace addon?

3 answers

1 accepted

1 vote
Answer accepted
Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 31, 2021

@Joe Pakenham What you could do is isolate the 'stuff only certain users should see' in a sub-task of the main request, e.g. staff address details, and then use an Issue Security Scheme for the sub-tasks to restrict the viewing access to only certain users. All of the data which is needing to be secure could then only be referenced in the sub-tasks.

You would need to create a copy of the service request workflow and assign this workflow to sub-tasks in a workflow scheme, and then on this cloned workflow you can set a Security Level on the Create transition. In the security scheme, you can add any of these following values to the security level, and you could use a combination of these to only make the sub-task visible to particular users:

security scheme values.png

Issue History is designed for audit and traceability, and there is no way to delete this without cloning the task. So keeping the more secure data in a separate task (a sub-task in this case) could be a way of separating the 'common' and 'private' data.

Hope this helps!

Joe Pakenham March 31, 2021

This is very helpful, thank you Callum. I'll look into this with the team.

The cloning idea sounds quite useful too.

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 31, 2021

No worries! Let me know if you have any questions on it. If the solution works for you, feel free to hit the Accept Answer button, as this might be helpful for other users with the same question

1 vote
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 31, 2021

Hi @Joe Pakenham ,

I did something similar in the past for a DE customer. I used scriptrunner and, through a postfunction I deleted all the issue history.

Using built-in feature I think that this operation is not possible. 

Hope this helps,

Fabio

kammili tejraj February 15, 2022

@Fabio Racobaldo _Herzum_  Can you please post the script here ?

 

Thanks,

Tej.

0 votes
Shereen January 6, 2023

Hi @kammili tejraj 

I managed to delete the issue history via script runner console using the following script:

Just replace the Issue Key ("MON-123").

import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.component.ComponentAccessor
def issueManager = ComponentAccessor.getIssueManager()
Issue issue = issueManager.getIssueObject("MON-123")
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
changeHistoryManager.removeAllChangeItems(issue)

I got the script it from this blog and it worked on my end. https://mraddon.blog/2021/02/21/is-it-possible-to-delete-history-records-of-a-jira-issue-like-the-deletion-of-comments/

 

Cheers,

Shereen

Mike Johnson January 15, 2023

Any way to tweak the Scriptrunner query to delete specific history? I am looking for a way to delete history created at a specific time of day on a specific day, not the entire history.

Suggest an answer

Log in or Sign up to answer