Change issue history to remove old custom field values.

Tarun Sapra Community Champion Jan 11, 2019

Hello All,

I am trying to remove the old values of an custom field from the issue history of the issue.

The API for the changeHistoryManager -

https://docs.atlassian.com/software/jira/docs/api/7.6.1/index.html?com/atlassian/jira/issue/changehistory/ChangeHistoryManager.html

has the method 

 removeAllChangeItems

but this will clear all the changeItems associated with an issue whereas I require that only specific custom field's value should be removed from issue history tab. This is required taking into the consideration privacy constraints around certain custom field data values.

Thus, the requirement is that when an issue is closed in the workflow then not only certain custom field values be cleared (easy part) but also their previous set values be removed from the issue history. Now, I don't want to get into DB queries etc thus is there a way to do it via the Jira APIs

1 answer

1 vote

Hello Tarun,

The functional design for the history is to ensure there is an audit trail on what has changed within the issue. Having the ability to change items with the audit trail would void the concept of an audit log. While there is a method to remove all items within the history of the issue, there is not a method to update, replace or add (outside of making a change to the issue).

This may also cause an issue if you have security teams which review the audit logs or you must meet compliancy requirements which require audit logs for work done. Being able to modify these outside of complete removal may void and compliancy which may be in place.

While you may access the database, you should avoid making changes to the application within the database directly. Doing so may also cause application issues and inconsistencies which may result in larger performance within the application.

While you may be able to edit this data, it is advised that you don't manipulate the history of the issues.

Database updates are not supported and can result in integrity issues. 
Please ensure to test this before applying to production.

Regards,
Stephen Sifers

Tarun Sapra Community Champion Jan 15, 2019

Hello @Stephen Sifers

Thanks for your insightful reply.

I completely agree with you and understand the compliance and the audit part.

Our requirement is such that certain custom fields having sensitive user data need to be removed after the completion of the workflow. Now, we can delete the custom field values but the issue history log still displays the original values. And since there seems to be no way in the APIs to selectively delete the history of certain custom fields thus the only option seems to be the below method from the changeHistoryManager

removeAllChangeItems

Now, I know that this method will remove all the issue history which again can be a problem with compliance and auditing. Thus, we might have a separate project with limited fields for our requirement which deals with sensitive customer data which needs deletion at the end of workflow. 

Let me know what you think of the approach or if you have some alternative approaches in mind. 

Thanks!

Hello again Tarun,

To ensure your sensitive data is protected, you may want to consider using an add-on which would allow you to hide said fields from the audit history. This would allow you to maintain compliance along with ensuring the sensitive data stays hidden but accessible.

Here is a preset search within the Atlassian Marketplace for field security add-ons. These add-ons would allow you to hide and secure the content of selected fields. These will also help to avoid the manual work of removing audit history entries which contain sensitive content.

This option of an add-on would most likely better suite other sensitive data needs that you may have as well. Along with possibly providing security to ensure only certain groups can see said sensitive content.

I hope this helps to provide a path forward with a more suitable solution to your needs.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Jira

How you can achieve compact and easy-to-maintain workflows in your JIRA( Server)

This approach requires you to have the JIRA administrative rights. The main aim of this article is to help you achieve an organized, easy-to-maintain workflows in your JIRA instance thereby, reducin...

211 views 0 0
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you