SORMAS-Project icon indicating copy to clipboard operation
SORMAS-Project copied to clipboard

S2S_ implement a warning message when data can be edited although they do not belong to me

Open SahaLinaPrueger opened this issue 2 years ago • 6 comments

Feature Description

Currently it is possible that two instances can simultaneously work on a case/contact/ person.

Follow the steps to reproduce:

First scenario

  1. share the case/contact with ownership (with hand over the ownership)
  2. accept the case/contact in target system
  3. open the case/contact in source system -> you can not edit anything. Everything is greyed out.
  4. open the person of the case/contact in the source system -> you can edit something
  5. add something
  6. look in target system if sync is correct (sync works)

Second scenario

  1. make sure there exist at least two cases OR one case and one contact OR two contacts for/on/at the same person in the source system.
  2. repeat the steps of the first scenario and then continue with the following steps:
  3. open the case/contact you have not shared (case/ contact is still editable)
  4. go to the tab case/contact person and try to add something -> you can add/edit something

Third scenario

  1. share a case/contact for viewing / to view / with no hand over the ownership
  2. Accept the case/contact on target system
  3. open the case /contact in target system -> everything is greyed out
  4. open the person in target system -> everything is greyed out
  5. add a new case/contact with the same data so the duplicate detection for person show up
  6. add the new case/contact to the existing person
  7. try to edit data in the new case/ contact tab case/contact person
  8. see if sync to source system works -> works

Proposed Change

  • Add a warning message Please note: The person is shared with another organization. Please check if you are responsible for this person. If you change something on this person, the person will also be changed immediately at the other organisation. If you are not responsible, it will lead to confusion
  • AND add a big red ! in a triangle - and by hovering over it the warning message appears.

Add both on the following places:

  • First scenario:
    step 4:

  • [ ] Add the pop-up warning message if the user opens the person. The pop-up warning message can be closed and the user sees the person.

  • [ ] Add a big red ! in a triangle in the following place and by hovering over it the warning message (see above) appears: image

  • Second scenario step 8:

  • [ ] Add the pop-up warning message if the user opens the tab case person/ tab contact person . The pop-up warning message can be closed and the user sees the tab case person/ tab contact person

  • [ ] Add a big red ! in a triangle in the following place and by hovering over it the warning message (see above) appears: image

  • Third scenario step 7:

  • [ ] Add the pop-up warning message if the user opens the tab case person/ tab contact person . The pop-up warning message can be closed and the user sees the tab case person/ tab contact person

  • [ ] And add a big red ! in a triangle in the following place and by hovering over it the warning message (see above) appears: image

Acceptance Criteria

Implementation Details

Additional Information

SahaLinaPrueger avatar Jul 28 '22 18:07 SahaLinaPrueger

@JaquM-HZI

SahaLinaPrueger avatar Jul 28 '22 21:07 SahaLinaPrueger

Open question: Does keeping persons in-sync between instances makes sense?

StefanKock avatar Sep 12 '22 12:09 StefanKock

@StefanKock Yes. Especially people's names or dates of birth can be misspelled or mixed up.

SahaLinaPrueger avatar Sep 13 '22 09:09 SahaLinaPrueger

I think It is fine if multiple instances or jurisdictions can edit a person, condition that the person is linked to the entities in the instances or jurisdictions. However, only one instances/ jurisdiction should have full access to entities of a person at a point in time.

For scenario 3, when I add a new entity to the existing person with read access only, then I should automatically have full access to the person and the entity that I added, but read access to the other entities shared with me.

bernardsilenou avatar Sep 15 '22 13:09 bernardsilenou

@StefanKock

  • We stay with the decision, that we want the persons to be synced.
  • I know that we do not share persons, but i thought this would be the easiest way to make this understandable to the user. Do you have a better suggestion? I can imagine that it is difficult as a developer to tell half-truths. Would this be better: Please note: A case or contact of this person is shared with another organization. Please check if you are responsible for this person. If you change something on this person, the person will also be changed immediately at the other organization. If you are not responsible, this will lead to confusion
  • @bernardsilenou I also thought about this but then I thought that might get too complicated, but you are absolutely right. If I have a case or a contact in my system that is owned by me, I should be able to edit the person. Then we have to implement the warning message at this place, too. @StefanKock would you see this as a bug or a change? The bug/ change would be step 9 + step 10:
  1. share a case/contact for viewing / to view / with no hand over the ownership
  2. Accept the case/contact on target system
  3. open the case /contact in target system -> everything is greyed out
  4. open the person in target system -> everything is greyed out
  5. add a new case/contact with the same data so the duplicate detection for person show up
  6. add the new case/contact to the existing person
  7. try to edit data in the new case/ contact tab case/contact person
  8. see if sync to source system works -> works
  9. open the person on target system -> warning message appears + triangle -> you can edit something
  10. open the case/ contact which was shared with no hand over the ownership -> still NOT editable and tab case person / tab contact person still NOT editable, too.

SahaLinaPrueger avatar Sep 16 '22 14:09 SahaLinaPrueger

@StefanKock I forgot the following scenario: Can you please implement step 5, too?

  1. Source system: A case/contact with an attached event is shared with hand over the ownership
  2. Target system accepts the case/ contact
  3. Source system: Open the event of the shared case/contact with ownership
  4. Source system: open the tab "event participants" and click on the "event participant ID"
  5. Source system: warning message appears + triangle on the following place: image

SahaLinaPrueger avatar Sep 19 '22 09:09 SahaLinaPrueger

As discussed with @Jan-Boehme @markusmann-vg @MartinWahnschaffe and @JonasCir : Problem can be solved with #10544 and #10543 so i will discard this one.

SahaLinaPrueger avatar Oct 05 '22 11:10 SahaLinaPrueger