The metal bar and magnet work together to pull the system closed and keep it closed.  The only contact between the battery and the system board is through the battery cable.  Make sure the connector is firmly seated to the mainboard.  If it is, since the battery has a warranty from Dell, if it's not detected, have it replaced.  If it's defective, the replacement will work. If the issue is with the power circuit, the mainboard will need to be replaced.  That much swelling can easily have damaged traces on the system board and be the cause of the no-battery condition.  The presence or absence of the magnet won't make any difference to the battery detection. If you're still convinced the magnet needs to be there, you can buy replacement magnets from Amazon. Example: [URL]  
Hello, I recently bought a new battery for my XPS 13 7390 2-in-1 but it does not appear to work or even be detected by the laptop. I believe the issue is that I am missing the metal bar that has to be put in the bottom hole (I do have the magnet that goes in the top one). I would like to know how/where I could obtain one of these as they do not seem available for sale on Dell's website?
XPS 13 7390 2-in-1, battery magnet/metal bar