Is this possible?
I have tried setting some bogus agent requirement with SBuildType.addRequirement() and this effectively prevents the build configuration from being run, but when I go and remove the requirement with SBuildType.removeRequirement() it does not correctly reverse the effect. It shows my agent under the compatible agents list, but lists 0 as the number, and does not let me run my build configuration. If I then go and manually edit the requirements, it corrects the problem.
Is there something I am missing? Is there a better way to achieve this functionality?