Magnetic field controlled superconducting-resistive and resistive-superconducting transitions in highly hysteretic Josephson junctions