Fixing this issue is not a high priority for me (I’m not on the project at present), and realistically I can’t see myself making time to fix it in the near future based on my circumstances.
I wouldn’t trust the fix I wrote as I do not understand the edge cases that may arise, nor am I able to provide test cases for verifying correct behavior of the program. An even bigger part is that if upsert worked as intended this fix would be unnecessary.
@ndao I am hitting this issue too. It sounds like the OP does not have the resources to submit a PR. It would be ideal if Atlassian itself could prioritize and provide this fix, given that this effectively prevents the most recent publicly-available version of Connect from functioning with anything other than the toy in-memory database.