Skip to content
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

unable to change submission status #1581

Closed
manjitapandey opened this issue Jun 17, 2024 · 17 comments · Fixed by #1586
Closed

unable to change submission status #1581

manjitapandey opened this issue Jun 17, 2024 · 17 comments · Fixed by #1586
Assignees
Labels
bug Something isn't working priority:critical Blocking current tasks or user workflow

Comments

@manjitapandey
Copy link
Contributor

Describe the bug
I am unable to change submission status from pending to any other. No API hit is there and the pop-up behaves like static.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'submission table page'
  2. Click on 'tick icon on right of the table '
  3. Change submission status from pending to any other
  4. See error

Expected behavior
The submission status should be changed to respective status.

Screenshots
https://vimeo.com/960121064/2e5629ee22?share=copy
image

@NSUWAL123
Copy link
Contributor

Previously the task_id which is essential for updating the review state of a submission was retrieved from the all object
image_720

but now it seems to come under essential key
image_480

for quick fix should I just update the key name to essential or should finalize in which key the building line string & taskId would come

@spwoodcock
Copy link
Member

Answered this via slack message.

We are updating to be under the essential key and this likely will not change in the future.

However the more versatile fix is to use flatjson for the submission data on the API

@spwoodcock
Copy link
Member

Slack chat dump:

Sam Woodcock
11 hours ago
If we move the fields outside of the essential group in the XLSForm, it should fix the issue (as it essentially just reverts to how it was before) (edited)

Sam Woodcock
11 hours ago
The XLSForms are so finnicky and prone to breakage - the form for the project you were testing should be downloaded, modified, and reuploaded for testing

Sam Woodcock
11 hours ago
The digitisation_correct field should trigger an update to the status field. I just tested removing the essential group and verificiation group & it does work updating the status value in the submission

Sam Woodcock
11 hours ago
The entity status is still not updated, but I think this is probably because the link between the XLSForm field andthe entity field is made when the Entity is created. As the entity was generated when the status field was still nested under essetial , perhaps the linkage was not made correctly

Sam Woodcock
11 hours ago
In summary we need to update the XLSForm in osm-fieldwork to remove the groups essential and verification, plus also ideally remove the form_category field too.

@spwoodcock
Copy link
Member

spwoodcock commented Jun 19, 2024

I'll take a look this morning! Will update if I solve it 👍
If I run out of time, I will re-assign if that's ok 😄

I think this is related to a few different issues when the fields were moved into the essential group.
I will remove the essential group @NSUWAL123, as I think it's the easier option!
(apologies if you have worked to include the nested essential key until now!)

@spwoodcock spwoodcock assigned spwoodcock and unassigned NSUWAL123 Jun 19, 2024
@NSUWAL123
Copy link
Contributor

Sure

@spwoodcock
Copy link
Member

spwoodcock commented Jun 19, 2024

@NSUWAL123 I think I have worked out the issues.

I don't think we should rely on the form submission for the task_id.
In SubmissionsTable.tsx, can we instead get the taskId from the URL: searchParams.get('task_id')?
(this is done elsewhere in the file too 👍)

I will also keep the essential fields under the essential group, as that wasn't actually the error.
If this is used anywhere in the code, please update to essential?.field

@spwoodcock spwoodcock added the testing:ready Ready for testing label Jun 19, 2024
@spwoodcock spwoodcock reopened this Jun 19, 2024
@spwoodcock
Copy link
Member

I updated the file as described above. Hopefully it fixes the issue: fa3b235

@spwoodcock
Copy link
Member

Hold on, I thought this and #1576 were basically the same issue, but they are not.
Just to clarify, this issue is not about submission status, it's about review status, as in the video 👍

@spwoodcock
Copy link
Member

spwoodcock commented Jun 20, 2024

@NSUWAL123 can you foresee the change in this commit creating any issues?
fa3b235
image

If so, we can revert to use the task_id from the submission.
The key would now be taskId: row?.task_id instead of taskId: row?.all?.task_id (the all group from removed from the first version of the XLSForms).

@NSUWAL123
Copy link
Contributor

@spwoodcock, But why is it searchParams.get('task_id") ?

@spwoodcock
Copy link
Member

Damn I stupidly assumed this was URL search params, but it's search params for the table right?

In that case of course this makes no sense 🤦

I'll revert it!

@spwoodcock
Copy link
Member

Updated fbc2b37

@manjitapandey
Copy link
Contributor Author

@spwoodcock the issue is still the same.

@manjitapandey manjitapandey added testing:fail Failed testing and removed testing:ready Ready for testing labels Jun 21, 2024
@spwoodcock
Copy link
Member

Sorry I think we discussed two issues in this thread.

The one for displaying the filtered submissions in the submissions table is fixed.

The original issue related to review state I haven't looked at. I think that can go in the next release - what do you think?

@manjitapandey
Copy link
Contributor Author

I don't think we should wait for the next release to fix this review status update, Since it can be important for validator user. The major task for validator team would be validate the submission but due to this issue, the workflow for them seems to be breaking.

@spwoodcock
Copy link
Member

Fair enough 👍

I haven't considered validators important until now, as we don't even have the role implemented.

My main priority has always been to get users mapping & allow the manager to extract the end data.

@NSUWAL123
Copy link
Contributor

@spwoodcock, I will fix that review state issue quickly. the issue was mainly due to task_id null, since task_id is back, I will update the fields accordingly and make a PR ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:critical Blocking current tasks or user workflow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants