Skip to content

Conversation

@labkey-jeckels
Copy link
Contributor

@labkey-jeckels labkey-jeckels commented Sep 30, 2025

Original spec

Rationale

Incorporate feedback on the initial instrument scheduling work to get it closer to production usage.

Changes

  • Add monthly billing report
  • Add view that shows schedules for all instruments at once
  • Add webpart to help admins navigate setup, Instrument Scheduling Admin
  • Stop ending schedule events one minute short of the hour
  • Layout, formatting, and minor usability improvements

@labkey-jeckels
Copy link
Contributor Author

@labkey-danield I've got a basic automated test in place. I'm reluctant to do more until we have more feedback from the lab. For example, they've mentioned they're not sure they want to continue supporting splitting payment across methods for a single reservation.

@vagisha
Copy link
Collaborator

vagisha commented Oct 2, 2025

Sorry for the delay in reviewing. I pulled the branch on my dev machine, and the multi-instrument calendar overview looks great. Thank you for adding this view.

Here are some potential issues I noticed, along with a few suggestions for future improvement:

Pre-existing bugs (not introduced in this PR)

  • Clicking Add Payment Method link (Project Details page - targetedms-msProjectDetails.view)
    • The project is not pre-selected in the Project dropdown.
    • Clicking Submit or Cancel results in "No project selected" error because the returnUrl is missing the project param.
    • Likely cause: the URL is missing the project param in msProjectDetails.html. It should look something like:
const urlParams = {
            schemaName: 'targetedms',
            queryName: 'ProjectPaymentMethod',
            project: LABKEY.ActionURL.getParameter('project'),
            returnUrl: LABKEY.ActionURL.buildURL('targetedms', 'msProjectDetails', null, { project:  LABKEY.ActionURL.getParameter('project')})
        };
  • Payment Method filtering
    When scheduling instrument time, the Payment Method dropdown shows all payment methods (not just those linked to the project). Ideally, only project-linked methods should appear.
    (Note: This is how MSDaPl is set up, but the MacCoss lab may prefer not to require linking anymore. Worth clarifying with Genn and Rich.)
  • Duplicate project-payment method rows
    It’s currently possible to link the same project and payment method more than once, which creates duplicate rows in projectPaymentMethod table

Suggestions

  • Project Details page
    • Add a link to add a researcher to the project.
    • Show an overview of instrument time already scheduled for the project.
  • Your Projects grid
    • Is it possible to add a button to Add Project directly from here?
  • The Instrument Scheduling Admin webpart is very helpful. I think we should only need to use it for
    • Adding Instrument, Rate Type, Instrument Rate
    • Viewing the instrument billing report
      Other things like project / researcher mapping, adding payment method, project / payment method mapping should all be possible to do through the project details page.

@vagisha
Copy link
Collaborator

vagisha commented Oct 3, 2025

One more comment. In the Your Projects grid:

  • All projects are listed, even for users who are not researchers on those projects.
  • There’s also an error above the grid: "Ignoring filter/sort on column 'researcher' because it does not exist."
    This is because userProjects.sql doesn’t include the researcher column, but msProject.html is trying to filter on it.
image

Currently, msProject.html applies the researcher filter only for non-admins. But I think that admins like Genn and Rich would probably prefer to see only their projects in the Your Projects grid by default. There could be a button in the grid that lets admins view all projects.

@labkey-danield
Copy link
Contributor

A couple of more issues:

  1. Instrument Filter is not Applied
    Go to the All Instruments View (targetedms-scheduleAllInstruments.view)
    Set Project to All Projects.
    Filter to one instrument.
    Change project filter to a specific project.
    Result:
    The instrument filter is no longer applied. It looks like all instruments for that project are shown.

  2. When scheduling and instrumenty the value in Instrument drop down resets if project is changed.
    From a project (say Project 1) click schedule an instrument.
    In the Schedule Instrument Time page (/targetedms-scheduleInstrument.view):
    Select a different instrument from the default instrument.
    Change the operator.
    Change Project to a different project.
    Result:
    The value in the Instrument field resets to the default instrument.

I think this behavior with the value in the Instrument drop down is how I "appear" to get overlapping schedules...

  1. The value in the Instrument drop down is applied if I edit an existing schedule.
    From a project click schedule an instrument.
    In the Schedule Instrument Time page (/targetedms-scheduleInstrument.view):
    Select a different instrument from the default instrument.
    Save the schedule
    From the same project again schedule an instrument.
    This time select an existing schedule and edit it (change it's time)
    Result:
    A new schedule was created for the "default" instrument that is selected in the Instrument drop down.

@labkey-jeckels
Copy link
Contributor Author

A couple of more issues:

  1. Instrument Filter is not Applied
    Go to the All Instruments View (targetedms-scheduleAllInstruments.view)
    Set Project to All Projects.
    Filter to one instrument.
    Change project filter to a specific project.
    Result:
    The instrument filter is no longer applied. It looks like all instruments for that project are shown.
  2. When scheduling and instrumenty the value in Instrument drop down resets if project is changed.
    From a project (say Project 1) click schedule an instrument.
    In the Schedule Instrument Time page (/targetedms-scheduleInstrument.view):
    Select a different instrument from the default instrument.
    Change the operator.
    Change Project to a different project.
    Result:
    The value in the Instrument field resets to the default instrument.

I think this behavior with the value in the Instrument drop down is how I "appear" to get overlapping schedules...

  1. The value in the Instrument drop down is applied if I edit an existing schedule.
    From a project click schedule an instrument.
    In the Schedule Instrument Time page (/targetedms-scheduleInstrument.view):
    Select a different instrument from the default instrument.
    Save the schedule
    From the same project again schedule an instrument.
    This time select an existing schedule and edit it (change it's time)
    Result:
    A new schedule was created for the "default" instrument that is selected in the Instrument drop down.

These should be fixed. I'm less confident about the third but I'm unable to reproduce it.

@labkey-danield
Copy link
Contributor

A couple of more issues:

  1. Instrument Filter is not Applied
    Go to the All Instruments View (targetedms-scheduleAllInstruments.view)
    Set Project to All Projects.
    Filter to one instrument.
    Change project filter to a specific project.
    Result:
    The instrument filter is no longer applied. It looks like all instruments for that project are shown.
  2. When scheduling and instrumenty the value in Instrument drop down resets if project is changed.
    From a project (say Project 1) click schedule an instrument.
    In the Schedule Instrument Time page (/targetedms-scheduleInstrument.view):
    Select a different instrument from the default instrument.
    Change the operator.
    Change Project to a different project.
    Result:
    The value in the Instrument field resets to the default instrument.

I think this behavior with the value in the Instrument drop down is how I "appear" to get overlapping schedules...

  1. The value in the Instrument drop down is applied if I edit an existing schedule.
    From a project click schedule an instrument.
    In the Schedule Instrument Time page (/targetedms-scheduleInstrument.view):
    Select a different instrument from the default instrument.
    Save the schedule
    From the same project again schedule an instrument.
    This time select an existing schedule and edit it (change it's time)
    Result:
    A new schedule was created for the "default" instrument that is selected in the Instrument drop down.

These should be fixed. I'm less confident about the third but I'm unable to reproduce it.

Yep, these are fixed. I don't see any other issues that would prevent merging this work.

@labkey-jeckels labkey-jeckels merged commit 53b1455 into release25.7-SNAPSHOT Oct 9, 2025
7 of 8 checks passed
@labkey-jeckels labkey-jeckels deleted the 25.7_fb_instrumentScheduling branch October 9, 2025 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants