Skip to main content
1-Visitor
March 4, 2019
Solved

Deleted the IBPL Field - Looking for Some help to remove the reference !!

  • March 4, 2019
  • 1 reply
  • 3711 views

Hi All,

 

As part of some test scenario, We were deleted one of the IBPL fields which have millions of reference to many item types. is there a way that we can fix this issue without harming the database manually .inserting or updating database not recommended for such auto DB populated applications. Any help other than DB related would be highly appreciated. We really want to remove the references now !!

 

Thanks

Afsal Ashraf 

Best answer by awalsh

ah, okay. That makes more sense.  The field is deleted on Tier 1 staging, but not Tier 2, right?

 

On Tier 2, the field was used at some point by items of type ALM_Build. The only way to delete the field is to delete these items first. Which depending on the items, may not be possible. 

 

If the field is still visible on the item type, then you can run a query for any item that has this field in the history. I'm not sure if that works when the field is not visible on the item type.

 

If that doesn't work .. a database query may be the only way to find the items:

For example:

im diag --diag=runsql --param="select IssueDeltas.ParentID as Item from IssueDeltas JOIN IssueDeltaAtoms on IssueDeltas.ID=IssueDeltaAtoms.ParentID where AtomID=fieldID"

where fieldID is the ID for the ALM_Predecessor field. To get the field ID, run "im fields --fields=ID ALM_Predecessor"

1 reply

5-Regular Member
March 4, 2019

The best option would be to create a support cases, as this could get complicated.

 

How did you delete the ibpl field? Usually a field deletion fails if the field is referenced by any type or if it has been used in any item.

What types of references are left behind - that is, are you seeing the field in queries, types, items? Somewhere else?

Are you getting errors? If so, what are the errors?

afsalva11-VisitorAuthor
1-Visitor
March 5, 2019

The scenario is we had an IBPL field, which had references. We removed the referenced items as well as deleted the IBPL field.

 

Once the field was deleted we tried to migrate this to our staging tier 2 server (our setup Tier1--> tier2 --> Prod). During the migration from tier 1 to tier 2 we got the below error: "The admin migration could not be completed. No changes have been made to the production server. The following details were provided: Could not delete the Field "ALM_Predecessor" for the following reason: Field cannot be deleted because there are item history entries for the type(s) ALM_Build that are referencing the field. These items that reference the field must first be deleted. "

 

The field ALM_Presecessor is the IBPL field, I am also not able to view this field either in GUI or CLI as it has been deleted in Tier 1 but still exists in Tier 2 (as it was previously migrated successfully).

 

There is no reference showing from the type Build towards the IBPL field ALM_Predecessor when I view the type references tab.

awalsh5-Regular MemberAnswer
5-Regular Member
March 7, 2019

ah, okay. That makes more sense.  The field is deleted on Tier 1 staging, but not Tier 2, right?

 

On Tier 2, the field was used at some point by items of type ALM_Build. The only way to delete the field is to delete these items first. Which depending on the items, may not be possible. 

 

If the field is still visible on the item type, then you can run a query for any item that has this field in the history. I'm not sure if that works when the field is not visible on the item type.

 

If that doesn't work .. a database query may be the only way to find the items:

For example:

im diag --diag=runsql --param="select IssueDeltas.ParentID as Item from IssueDeltas JOIN IssueDeltaAtoms on IssueDeltas.ID=IssueDeltaAtoms.ParentID where AtomID=fieldID"

where fieldID is the ID for the ALM_Predecessor field. To get the field ID, run "im fields --fields=ID ALM_Predecessor"