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

S2S_added sample after sharing a case/contact does not get shared [2] #9771

Closed
Tracked by #10739
SahaLinaPrueger opened this issue Jul 7, 2022 · 7 comments · Fixed by #9961 or #10006
Closed
Tracked by #10739

S2S_added sample after sharing a case/contact does not get shared [2] #9771

SahaLinaPrueger opened this issue Jul 7, 2022 · 7 comments · Fixed by #9961 or #10006
Assignees
Labels
backend Affects the web backend change A change of an existing feature (ticket type) qa-verified Issue has been tested and verified by QA s2s Issues related to the SORMAS2SORMAS functionality

Comments

@SahaLinaPrueger
Copy link

SahaLinaPrueger commented Jul 7, 2022

Bug Description

Added sample after sharing a case/contact does not get shared.

Steps to Reproduce

  1. Create a case/ contact in source system
  2. Add a Sample
  3. Share case/contact to target system
  4. Add another sample in source system
  5. Accept case/contact in target system
  6. Check if both samples are visible in target system
  7. Currently just one sample is visible in target system
  8. Check if both samples are visible in source system
  9. Currently both samples are visible in source system

-> tested with different combinations of dates -> no difference, both samples are never visible in target system
-> with vaccinations everything is fine and works

Expected Behavior

Both samples should also be visible in target system

Screenshots

source system:
image

target system:
image

System Details

  • Device: Windows 11
  • SORMAS version: 1.73.1
  • Android version/Browser: Edge
  • Server URL: release-sormas-x / release-de
  • User Role: admin

Additional Information

@SahaLinaPrueger SahaLinaPrueger added bug An error or misbehavior of an existing feature (ticket type) s2s Issues related to the SORMAS2SORMAS functionality labels Jul 7, 2022
@SahaLinaPrueger
Copy link
Author

@JaquM-HZI

@leventegal-she
Copy link
Contributor

The second sample is not shared because it was added after the share request has been sent and the share request on the target system doesn't contain the new sample.
The same thing happens when you share case with contacts.

I'm not sure it's would be ok share more data then the accepted request contains.

To send also the second sample a new share request needs to be sent.

I don't consider this to be a bug. We would need a change request for changing this behaviour.

@SahaLinaPrueger
Copy link
Author

The current situation means that neither the target system can see the sample, nor the source system can edit or view the sample. For Vaccination everything works as it should. The shared elements should be synchronised on both sides.
After the target system accepts the share request, the target system can add samples and the added samples are sync to the source system. Only the added sample while the status of the share request was 'pending' does not appear in the target system.
I consider this is a bug.

I'm not sure it's would be ok share more data then the accepted request contains. The status of the share request is pending. As long as the target system has not accepted the share request, it is ok.

To send also the second sample a new share request needs to be sent. If it can technically only be solved in this way, the share request must be revoked in the background and a new share request must be sent automatically in the background. There must be no additional effort for the user.

@StefanKock StefanKock added discuss backend Affects the web backend labels Jul 13, 2022
@StefanKock StefanKock removed this from the Sprint 117 - 1.74.0 milestone Jul 13, 2022
@StefanKock
Copy link
Contributor

Moved out of 1.74 and to be discussed.

@markusmann-vg markusmann-vg added change A change of an existing feature (ticket type) and removed bug An error or misbehavior of an existing feature (ticket type) discuss labels Jul 18, 2022
@markusmann-vg
Copy link

@leventegal-she
According to @JaquM-HZI it should be implemented as described and therefore it's a change
We'll discuss it in the refinement and estimate the effort

@markusmann-vg markusmann-vg changed the title S2S_added sample after sharing a case/contact does not get shared S2S_added sample after sharing a case/contact does not get shared [2] Jul 20, 2022
@leventegal-she leventegal-she self-assigned this Jul 22, 2022
JonasCir added a commit that referenced this issue Jul 28, 2022
…les_to_pending_share_request

#9771 S2S_added sample after sharing a case/contact does not get shared
@AndyBakcsy-she AndyBakcsy-she self-assigned this Jul 29, 2022
@AndyBakcsy-she AndyBakcsy-she added the qa-verified Issue has been tested and verified by QA label Jul 29, 2022
@AndyBakcsy-she
Copy link

Validated ticket on a peer-testing session with Levi

@StefanKock StefanKock reopened this Aug 1, 2022
@StefanKock
Copy link
Contributor

StefanKock commented Aug 1, 2022

Reported by @fhauptmann: Deployment on test-de1 and test-de2 not working:

Updating database to version 477... (de.symeda.sormas.backend.common.StartupShutdownService.java:738)
ERROR: column "datatype" contains null values

  A system exception occurred during an invocation on EJB UpdateQueryTransactionWrapper, method: public int de.symeda.sormas.backend.common.StartupShutdownService$UpdateQueryTransactionWrapper.executeUpdate(de.symeda.sormas.backend.common.StartupShutdownService$UpdateQueryTransactionWrapper$TargetDb,java.lang.String)]]
sormas_1             |
[2022-08-01T10:32:12.203+0200] [Payara 5.2021.10] [WARNUNG] [] [javax.enterprise.ejb.container] [tid: _ThreadID=114 _ThreadName=payara-executor-service-scheduled-task] [timeMillis: 1659342732203] [levelValue: 900] [[
sormas_1             |
javax.ejb.EJBException: org.hibernate.exception.ConstraintViolationException: could not execute statement
...
 at com.sun.proxy.$Proxy1141.executeUpdate(Unknown Source)
 at de.symeda.sormas.backend.common.__EJB31_Generated__StartupShutdownService$UpdateQueryTransactionWrapper__Intf____Bean__.executeUpdate(Unknown Source)
 at de.symeda.sormas.backend.common.StartupShutdownService.updateDatabase(StartupShutdownService.java:739)
 at de.symeda.sormas.backend.common.StartupShutdownService.startup(StartupShutdownService.java:207)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
...
 at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1696)
 ... 133 more
Caused by: org.postgresql.util.PSQLException: ERROR: column "datatype" contains null values
 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
...
 at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
 ... 137 more
]]

leventegal-she pushed a commit that referenced this issue Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Affects the web backend change A change of an existing feature (ticket type) qa-verified Issue has been tested and verified by QA s2s Issues related to the SORMAS2SORMAS functionality
Projects
None yet
6 participants