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

Get rid of submissionCreate from GET entities/:uuid/audits #1036

Closed
sadiqkhoja opened this issue Oct 30, 2023 · 2 comments · Fixed by #1072
Closed

Get rid of submissionCreate from GET entities/:uuid/audits #1036

sadiqkhoja opened this issue Oct 30, 2023 · 2 comments · Fixed by #1072
Assignees
Labels
entities Multiple Encounter workflows refactor Improves code without altering behavior

Comments

@sadiqkhoja
Copy link
Contributor

From #1028 (comment)

... how the submissionCreate property of the audit log details feels like it could be improved. Currently, submissionCreate is needed if the submission is deleted, because in that case, no submission property is returned, so submissionCreate is the only way to get basic information about the submission (e.g., instanceId). As an alternative, we could always return a submission property. (In the deleted case, maybe we construct submission using the submission.create event.) That'd work similarly to the entity property, which is always returned and includes basic information (e.g., uuid) even if the entity is deleted.

@sadiqkhoja sadiqkhoja moved this to 🕒 backlog in ODK Central Oct 30, 2023
@matthew-white matthew-white added refactor Improves code without altering behavior entities Multiple Encounter workflows labels Oct 31, 2023
@ktuite ktuite self-assigned this Nov 27, 2023
@matthew-white
Copy link
Member

@ktuite and I chatted about this issue. We'd like to make this change at some point, but we probably won't get to it for v2023.5. However, we'll be touching entity sources again in v2024.1 as we work on bulk upload. I'll go ahead and bump this issue.

@ktuite ktuite self-assigned this Jan 5, 2024
@ktuite
Copy link
Member

ktuite commented Jan 17, 2024

Places to change code in backend

  • audits for entities
  • getWithConflicDetails (passes thru audit details)

Places to change code in frontend entity components:

  • activity (code adds another event to show submission created if needed)
  • basic details (shows the creating submission or nothing if created with api)
  • feed entry
  • version link

Ways submissionCreate is used

  • to tell if entity was created with a submission or api
  • get the instance id of the submission
  • absence of submission and presence of submissionCreate indicates that submission was deleted

Plan

  • move things from submissionCreate into submission property and always return submission
    • instance id
    • creator and creation date (as full actor object)
    • easy way to tell if submission is deleted or not (maybe presence of currentVersion?)

@ktuite ktuite moved this from 🕒 backlog to ✏️ in progress in ODK Central Jan 17, 2024
@github-project-automation github-project-automation bot moved this from ✏️ in progress to ✅ done in ODK Central Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
entities Multiple Encounter workflows refactor Improves code without altering behavior
Projects
Status: ✅ done
Development

Successfully merging a pull request may close this issue.

3 participants