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

LIMS-1422: Reprocessing dialog edits the end value unpredictably #819

Conversation

ndg63276
Copy link
Collaborator

JIRA ticket: LIMS-1422

Summary:

The reprocessing dialog tries to help by autofilling the end value, but sometimes that concats a 1 to the start, sometimes adds a 1 to the number resulting in impossible parameters.

As discussed on Slack at https://diamondlightsource.slack.com/archives/CKS8PRR0Q/p1722949258543509

Changes:

  • Use Math.round instead of Math.floor or Math.ceil to ensure the image numbers are not affected randomly
  • Only autocorrect the start/end image numbers if something has been filled in, rather than putting something in before the user has a chance
  • Make the "submitted successfully" message be in green not red.

To test:
First, check the current behaviour.

  • Open https://ispyb.diamond.ac.uk/dc/visit/mx23694-118/id/14808375 in a 1920 pixel width Firefox window
  • Click the reprocess (cog) icon
  • Type a 1 in the Start field, notice how a 1 appears in the End field
  • Change the End field to 110, see if it magically changes to 111. If it doesn't, try other numbers, it seems to be a property of the browser and window size. In Chrome, on that data collection, 111 changes to 112.
  • Type a number over 3600 in the End field, it should change to 3600
  • Click "Integrate" to submit the job, the message window is red

Now load the same page on a dev instance with this PR

  • Type a 1 in the Start field, nothing should yet appear in the End field
  • Type 110 in the End field, check it doesn't change
  • Type a number over 3600 in the End field, it should still change to 3600
  • Click "Integrate" to submit the job, the message window should be green

@gfrn gfrn added javascript Pull requests that update Javascript code Ready to Release labels Aug 27, 2024
@ndg63276 ndg63276 changed the base branch from master to pre-release/2024-R4.3 September 17, 2024 08:57
@ndg63276 ndg63276 merged commit d28a9ef into pre-release/2024-R4.3 Sep 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code Ready to Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants