You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: report.md
+27-7
Original file line number
Diff line number
Diff line change
@@ -221,20 +221,20 @@ you took care of and where you spent your time, if that time exceeds
221
221
222
222
1. plenary discussions/meetings
223
223
224
-
**0.5 hours**- Start up meeting
224
+
**0.5 hours** Start up meeting
225
225
226
-
**1 hour**- Issue selection meeting
226
+
**1 hour** Issue selection meeting
227
227
228
-
**1 hour**- Reevaluating our issue choice after consultation with Cyrille and finding a new one
228
+
**1 hour** Reevaluating our issue choice after consultation with Cyrille and finding a new one
229
229
230
-
**0.5 hours**- Project plan meeting for issue #5284
230
+
**0.5 hours** Project plan meeting for issue #5284
231
231
232
-
**0.5 hours**- meeting for issue #5284 and further discussion
232
+
**0.5 hours** meeting for issue #5284 and further discussion
233
233
234
234
235
235
2. discussions within parts of the group
236
236
237
-
**0.5 hours**- syncing
237
+
**0.5 hours** syncing
238
238
239
239
3. reading documentation
240
240
@@ -262,7 +262,7 @@ you took care of and where you spent your time, if that time exceeds
262
262
263
263
**0.5 hours** peer programming with Jonatan
264
264
265
-
**1 hours** writing proper solution for issue #5284
265
+
**1 hour** writing proper solution for issue #5284
266
266
267
267
268
268
8. running code?
@@ -343,6 +343,26 @@ Our plan to implement this is as follows:
343
343
344
344
## Code changes
345
345
346
+
To change the code according according to the work plan, we had to change three different files. The solution for this can be found on this [branch](https://github.com/DD2480-group8-VT24/apps-android-commons/tree/issue-5284_Prevent_retries_for_genuinely_failed_uploads).
To update the contribution class, we have created two different variables. The first one, [errorMessage](https://github.com/DD2480-group8-VT24/apps-android-commons/blob/d75c3a6086b3f9f6ef035a2b69cedb889a0756dd/app/src/main/java/fr/free/nrw/commons/contributions/Contribution.kt#L32C30-L32C31), makes certain that we can save custom error messages to a field in the contribution. The second change correlates to the variable [exceptionMessage](https://github.com/DD2480-group8-VT24/apps-android-commons/blob/d75c3a6086b3f9f6ef035a2b69cedb889a0756dd/app/src/main/java/fr/free/nrw/commons/contributions/Contribution.kt#L33C9-L33C25) which will store the exception as a string. Both of these variables are set to null in the beginning to ensure a genunine error analysis.
This function had to be changed more severely by using the existing contribution object and updating the errorMessage and expectionMessage accordingly. Starting by setting
In [this function](https://github.com/DD2480-group8-VT24/apps-android-commons/blob/d75c3a6086b3f9f6ef035a2b69cedb889a0756dd/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsFragment.java#L687), we check, before retrying the upload, whether the mistake was genuine or not. When it was a genuine failure, we do not try to reupload. For that, we call a new function called [isGenuineError](https://github.com/DD2480-group8-VT24/apps-android-commons/blob/d75c3a6086b3f9f6ef035a2b69cedb889a0756dd/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsFragment.java#L713).
359
+
360
+
These arrays [STASH_ERROR_CODES](https://github.com/DD2480-group8-VT24/apps-android-commons/blob/d75c3a6086b3f9f6ef035a2b69cedb889a0756dd/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsFragment.java#L121) and [STASH_EXCEPTIONS](https://github.com/DD2480-group8-VT24/apps-android-commons/blob/d75c3a6086b3f9f6ef035a2b69cedb889a0756dd/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsFragment.java#L121) simply store the different types of error codes to be then used later on.
361
+
362
+
The function [isGenuineError](https://github.com/DD2480-group8-VT24/apps-android-commons/blob/d75c3a6086b3f9f6ef035a2b69cedb889a0756dd/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsFragment.java#L713) compares the errorMessage to the errorCodes and the expetionMessage to its counterpart of stashed exceptions.
363
+
364
+
5. It should then tell the user what actually happened in the code by modifying the error message that will be send in [retryUpload](https://github.com/DD2480-group8-VT24/apps-android-commons/blob/d75c3a6086b3f9f6ef035a2b69cedb889a0756dd/app/src/main/java/fr/free/nrw/commons/contributions/ContributionsFragment.java#L677).
365
+
346
366
### Patch
347
367
348
368
(copy your changes or the add git command to show them)
0 commit comments