Sunday, June 25, 2017

After adding a checkbox to the test report form to differentiate staging releases from the development branch went fairly smoothly, I decided to take a stab at a longstanding and (for AppDB admins) very annoying bug: new distributions are added to the database even if the admin rejects them.

The test report form users fill out has a dropdown list from which they can select their operating system (though it's labeled "Distribution," which is in itself a problem since we also have MacOS and *BSD users). There is also an input box for users to add their operating system/distribution if they don't find it on the list, and that's where the problem starts. Some users don't search very carefully and enter distros that are already on the list, while others misunderstand the Distribution label completely and try to enter the name of the developer, distributor, or the application version.

Whatever the mistake, maintainers and admins are supposed to be able to correct it when processing test reports, and that's what's not working. The person processing the queued form can delete the added distribution from the input box and select one from the dropdown list, but that change is ignored when the test report is approved and the invalid distro is added to the database, with the test report still attached to it.

So I spent the past week and a half beating my head against the wall trying to figure out why this is happening. Much of that was focused on comparing the code for submitting new distributions to the code for submitting new vendors, which has the same UI but is working properly. I  tried changing parts of the distribution code to mimic the way it was done in t he vendor code. Changing the way the dropdown list is generated made a partial difference, and I do have a patch that enables the test report to be submitted with the changed information. Unfortunately, the incorrect distro is still added to the database (albeit with zero tests attached, so it's easier to clean up) so I know it's not completely correct.

At that point I decided to take a step back and work on something else for awhile. Not giving up; I'll come back to it with fresh eyes and a bit more experience.

On the plus side, the first thing I turned my attention to was another old bug turned out to be simply a typo in a URL.

No comments:

Post a Comment