What happens to the data when you remove a field context

Ralph Maalouf August 12, 2020

I found that Jira Cloud makes it very easy to accidentally remove a field context since confirmation is not asked for. There are already a few open tickets about this and some people say that this can cause data loss that can only be recovered by restoring from backup or by contacting Atlassian support.

https://jira.atlassian.com/browse/JRACLOUD-27957

However I also found the following community post where @Nic Brough -Adaptavist- mentions

https://community.atlassian.com/t5/Jira-questions/Can-I-remove-a-Custom-Field-from-a-Screen-without-loosing-the/qaq-p/316696

"Removing the field from the screen, or even from the field configurations, or field contexts, will not lose the existing data." ... "Removing it via field configuration or context will remove it from searching and reporting, but still not damage the raw data it stores."

From my own testing I noticed that if I delete a field context for a single list field, and then recreate the context (without recreating the validation list), and then refresh the issue page, the field actually displays the old data (prior to deleting the context) for a a split second while the page is loading but ends up displaying "None" once the page is fully loaded.

So it seems like the old data still exists but is no longer being displayed in the issue.

What exactly is going on under the hood? Is every single custom field actually associated with every single issue type, regardless of whether a field context exists? and context/screen config/field config only dictate whether a field ignored and/or hidden?

Is there an easy way to undo the effects of deleting a context without having to restore from backup or contact Atlassian support? Recreating the context with the same validation list did not work (the issue still ends up displaying "None" for the field in question)

2 answers

1 accepted

5 votes
Answer accepted
Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2020

Hi @Ralph Maalouf 

Basically all the data still exist and is stored with the exception of an actual delete. However when you delete a context accidentally from a custom field, it basically removes the association of the data to the field itself. The problem here is with re-association, Jira doesn't do this automatically for certain field types hence when you add the context back, you get that split second view of it but then it disappears but on some fields such as Labels or user picker field this is done seamlessly.

So to expand on this thought, there could be a reason why this re-association isn't done for certain fields and is done for others. However take note that all those data still exist on Jira's database, the problem is the difficulties it takes to find the right values.

I wrote this discussion on using REST API to actually perform back a re-association using the changelog history from an issue. As it is one of the ways i thought about tackling this issue for those fields that doesn't automatically re-associate themselves when such custom field context is removed by mistake.

In summary, removing the field from screens or fields or custom field context has no effect on the data itself. custom fields and its values is stored to its own tables, other entities such as issue types, screens just associates its properties to it and extract the values they need based on those association.

0 votes
Ralph Maalouf August 13, 2020

@Prince NyecheThanks! Your answer and article cleared it up for me.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events