As I've learned so far (Planbranch cleanup option in database), the planbranch setting "Clean up plan branch automatically" is stored in the Bamboo database in the table BUILD_DEFINITION (column: XML_DEFINITION_DATA):
<cleanup><disabled>true</disabled></cleanup>
With the column being an NTEXT column, it is kind of laborious, if the switch would have to be toggled, I would have to work with temporary tables, doing casting, etc.
Isn't there an easier way to disable the setting "Clean up plan branch automatically" (i.e. the XML_DEFINITION_DATA value) automatically for specific branch types (i.e. bugfix/)?
Both two expiry settings need to be taken into consideration:
- cleanup due to git delete branch
- cleanup due to branch inactivity
Is the only chance to look for bugfix/ branches in the tables and set disabled to true in the XML?