Clinical-Genomics / cg

Glue between Clinical Genomics apps
8 stars 2 forks source link

Bug: Delivery of cases where case.name is the same as the sample.name #3745

Open karlnyr opened 1 month ago

karlnyr commented 1 month ago

Describe the bug

When one delivers a case today the idea is that we create the following two directories under the ticket folder in the customer's inbox. For example, if we have a case with an case.internal_id funnycat and a case.name case-name, with a sample with the sample.name sample-name:

cg deliver case --dry-run -c funnycat # Delivers the case to the inbox, thus we get
ll /path/to/inbox/<ticket_id>/
case-name
sample-name

Where we today put everything "case" related into the folder named case-name and everything "sample" related into the folder named sample-name.

However, users are able to place the order of a case, where the case.name is the same as sample.name. This makes the delivery structure different. For example, if we change the sample.name to case-name above we would get:

cg deliver case --dry-run -c funnycat # Delivers the case to the inbox
ll /path/to/inbox/<ticket_id>/
case-name # This folder now contains both the case files and the sample files

As the case.name and sample.name are the same we redirect the files to the same location. This is not the end of the world, but confusing to our customers if they expect the sample files to be in the sample folder, but the sample folder is now the case folder.

To Reproduce Steps to reproduce the behavior:

  1. `cg deliver case --dry-run -c

Expected behavior

I expect that we have a consistent format of delivery. Either we put everything into one folder, or keep them separate as is. But if we want to keep them separate we also have to remove the possibility of placing orders where the case.name is equal to the sample.name

Additional context Add any other context about the problem here.

karlnyr commented 1 month ago

I am uncertain of the effort, to be honest, it feels like it could vary a bit.

diitaz93 commented 1 month ago

Acceptance criteria by sysdev

The sample name can not be equal to the case name

diitaz93 commented 1 month ago

Awaiting refinement by @Clinical-Genomics/prodbioinfo

karlnyr commented 4 weeks ago

We want this 👍

Vince-janv commented 4 weeks ago

Technical refinement