-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh submission keys in more cases #521
Comments
QA observed related behavior in the "Analyze via OData" button on the submissions table (and entities table, coming in 2023.2). Steps to reproduce
Looking into it, I think the cause is this: when the submission list is loaded with 0 submissions and there's a request to submission keys, that response comes back as an empty array. When there are new submissions and the "refresh" button is pressed, the submission keys aren't refetched/refreshed until the page is fully reloaded. Whether or not to show the button is based on the presence of these keys and number of submissions. This is another case for refreshing the submission keys when the submissions are updated, but that requires figuring out which component should be in charge of that. |
@getodk/testers I believe we fixed the underlying issue that caused a bunch of these problems. This is how I was testing it while working on it:
|
I think so too. @getodk/testers, you can see issues mentioned above that referenced this one as the underlying cause. |
Tested with Success! |
1 similar comment
Tested with Success! |
Filing an issue based on this forum topic: https://forum.getodk.org/t/draft-submissions-not-accessible-when-project-is-encrypted-missing-passphrase-prompt-to-decrypt/36133
Right now, when submissions are refreshed (in either the Submissions tab or the Testing tab), we do not refresh the submission keys. That helps reduce the number of requests and usually works fine, with the thought that it is rare for there to be a change in the submission keys. However, in some cases, this leads to the "Decrypt and Download" modal not being shown: the user is not prompted for the passphrase.
The forum topic describe this use of the Testing tab:
I also remember @lognaturel encountering an issue like this in the past. I think the issue then went something like this:
I think we decided that this second sequence was uncommon enough that we didn't need to make a change. However, the first sequence sounds like a more common workflow that I think we should address. (Maybe we should refresh the submission keys whenever we refresh the submissions. Or maybe we could refresh the submission keys only when there were previously no submissions: that wouldn't solve the second sequence, but it would solve the first.)
Either way, there is some complexity here because of how the components are set up:
SubmissionList
is the component shared between the two tabs and sends most of the requests, but it is the two separate tab components (FormSubmissions
andFormDraftTesting
) that send the requests for the submission keys.The text was updated successfully, but these errors were encountered: