Closed briri closed 7 years ago
checked old dmponline v4 and bug exists in code there. In roadmap there also seems to be bugs in adding more than one note
Saving answers works sometimes. I didn't test extensively but it looked like it was saving the answer only if the question had a note first. To recreate the issue:
This page had some weirdness in the original DMPonline_v4 code where it was always auto-creating answers. I am wondering if the process of adding the note causes it to create an empty answer. That way the second attempt to add an answer is actually an update rather than insert.
The fundamental issue here is that saving answers and notes use two different approaches. Saving answers does it as an AJAX call and saving notes as a post and redraw the whole page. I think we need to change to both being AJAX calls. However, this is complicated by the fact that the HTML is significantly different depending on whether there is guidance or not. Will require quite a bit of reworking.
Some of this is fixed in https://github.com/DigitalCurationCentre/roadmap/commit/ea71f05769f349664752efeabca17df9c7dbb1cd but there is more to do. Answer text wasn't always saving properly. But the note saving still need rewritten as AJAX to avoid the clashing save mechanisms.
Tested the two use cases posted above and I was unable to produce any unexpected behavior around saving notes or answers.
This appears to be fixed
Tested the use cases above as well and everything working as expected.