Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Critical
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:
-
Story Points:1
-
Epic Link:
-
Sprint:Fall 5 : 14 Oct to 25 Oct, Fall 6 : 28 Oct to 8 Nov
Description
Steps to reproduce the issue:
1) Click on submit your app
2) Select an app to submit from "Choose File" option or Enter URL
3) Go back to the home page or click browser back button without submitting the app
This will create an entry in the pending apps table even if the app is not submitted for the release. Also, this will save the jar file for the app in pending_releases folder in s3 bucket.
Also, if the error page "Something is wrong" is displayed while submitting the app, the app entry will still be created in the AppPending table which can result in improper release of the app without user's approval.
Suggestion for how to address this problem:
Add a new boolean value field to AppPending class in submit_ap/models.py:
How this would work:
When user clicks "Next" on the "submit app" page UI, then App Store creates an entry in the AppPending table for the App. This is already being done. What's new is that the new row of data will include "submitter_approved" field set to False, the default.
Next, App Store displays the pre-submission feedback page, which shows information about this "pending" App.
If the user clicks "Submit", then "submitter_approved" changes to "True", along with other actions already being performed, such as sending an email to the user and to our app approvers ("admin" users).
If the user clicks "Cancel", then the row is deleted from the database and the uploaded jar file gets removed from the system.
If the user does nothing, then the field "submitter_approved" remains False.
Separately, we implement a data clearing mechanism that removes all stale AppPending rows (and jar files) with false "submitter_approved" and "created" dates older than a pre-set amount, e.g., 24 hours.
If a user gets distracted or disrupted during this process, they might repeat the app submission process from the beginning (most likely) or might return directly to this feedback page if it is still open.
If they repeat the process from the beginning before we get around to clearing out the old, stale data, then the previously uploaded jar file and the previously created entry in the pending apps database table will simply be over-written.
If they come back to the "feedback" page and click "Submit" after we have cleared the data, then we display a page that says something like "Sorry, this App is not longer in our system because too much time has passed since you first uploaded it. No problem! Please go back and try again."
Also, our admin users who can approve apps should only see Apps that have been approved by their submitter - i.e., submitter_approved is True. All other Apps could be shown in a different category on that page, or we could not show them at all. If somebody has changed their mind about submitting and an App or is maybe not sure they want to submit it, we should probably ignore it.
I think we should do something like the above rather than add more complexity to the system by using cookies and introducing state to user's browsers. Also, if we start using cookies, we have to show a disclaimer, which I feel are a bit annoying and distracting.