I planted them too close, and wanted to transplant them to another row. Beans are rarely transplanted because their transplant recovery is slow. It's faster to plant seeds because within a week they will germinate. Let the bean pods turn brown and dry off of the vine. Then shell the seeds and air dry a couple of days and store seeds in a refrigerator until planting.
Melon flies do attack beans, tomatoes, eggplant, bell peppers, melons, squash, and other cucurbits.
They will attack over 80 different plants. Beans treated with nitrogen fixing bacteria normally will give good growth and good production in soils lacking this bacteria. Most of our highly acid soils lack this bacteria. I've noticed small yellow dots or specks on my bean leaves. They are quite numerous.