UserOfficeProject / issue-tracker

Shared place for features and bugs from all collaborators.
0 stars 0 forks source link

Set up new instruments and instrument picker question #954

Closed TCMeldrum closed 7 months ago

TCMeldrum commented 1 year ago

We are switching over the instrument picker question we need to add the instruments to the software, assign scientists and add question to templates.

ACLay commented 10 months ago

Blocked by #974

ACLay commented 10 months ago

We'll need to have the question and instruments set up before the call opens. That's expected on 1st of March

TCMeldrum commented 10 months ago

We need to make sure any PDF generation is wokring as well

ACLay commented 9 months ago

I've a release scheduled for Friday that'll should remove the blockers on setting up instruments on prod.

ACLay commented 9 months ago

I've created all the ISIS instruments in our prod UOP deployment, using the same capitalisations as in the current multiselect question, and set them with instrument scientists taken from the schedulers USER_INSTRUMENT table. Not knowing who to assign as Beamline manager, and with Emma out of office this week, I just set her as that role. The ISIS "instrument" currently has Emma Roberts as beamline manager

TCMeldrum commented 9 months ago

Wainting on Dutch

ACLay commented 7 months ago

Dutch template is updated.

ACLay commented 7 months ago

So I've at least recorded it somewhere, here's the SQL I wrote to determine if an instrument scientist is missing from either Scheduler or UOP

   select coalesce(scheduler.instrument_name, submissions.name) as "Instrument",
          rp.user_number as "User number",
          rp.display_name as "User name",
          rp.account_email as "GDPR email",
          scheduler.user_number is null as "Missing In Scheduler",
          submissions.user_id is null as "Missing In Submissions"
     from (SELECT ui.INSTRUMENT_NAME, ui.USER_NUMBER
             FROM facility_schedule.facility_schedule.USER_INSTRUMENT ui 
             JOIN facility_schedule.facility_schedule.INSTRUMENT_DETAILS id 
               ON ui.INSTRUMENT_NAME = id.INSTRUMENT_NAME 
             JOIN facility_schedule.facility_schedule.SCHEDULED_FACILITY f
               ON id.FACILITY_ID = f.FACILITY_ID
            WHERE THRU_DATE IS null) scheduler
full join (select i.name, sci.user_id 
             from duo.public.instrument_has_scientists sci
             join duo.public.instruments i
               on sci.instrument_id = i.instrument_id
            where i.name not in ('ISIS', 'ARTEMIS', 'HPL', 'LSF')) submissions
       on (upper(scheduler.INSTRUMENT_NAME) = upper(submissions.name)
           or (scheduler.INSTRUMENT_NAME = 'PORT-1' and submissions.name = 'RIKEN port 1')
           or (scheduler.INSTRUMENT_NAME = 'PORT-3' and submissions.name = 'RIKEN port 3'))
          and scheduler.user_number = submissions.user_id
LEFT JOIN isisuserdb.isisuserdb.reporting_person rp
       ON cast(scheduler.USER_NUMBER as varchar) = rp.user_number
          or cast(submissions.user_id as varchar) = rp.user_number
    where scheduler.user_number is null
          or submissions.user_id is null
 order by "Instrument", rp.display_name