Elab 7.20 Upgrading Flashcards

1
Q

Elab 7.20 Upgrade

What timezone should backend and DB handle date times in?

A

UTC, and where needed, strings formatted per ISO8601

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Elab 7.20 Upgrade

Will servers always be set to UTC?

A

While that is the intent, there will be a period for many between upgrade and server being set to UTC. On prem instances also may choose to set server to local time. Thus, backend functions that just get current date/time are generally inadequate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Elab 7.20 Upgrade

How are Dates different than Date times?

A

Dates do not have a time, and are not different in different timezeones. The date of a scheduled event, a persons date of birth, marriage or death are all good examples.

The upgrade will not convert date fields, and applications should not attempt to convert between client and UTC time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Elab 7.20 Upgrade

How can you tell if something is a date or a datetime?

A

From the UI: A time will not be present for a COTS date field.

When setting up fields in the screen designer, or custom attributes, elab provides different data types that must be selected.

Past work, because the server was set to client time, was somewhat less distinctive in presentation, and in some cases, dates were shown with times.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Elab 7.20 Upgrade

What app layer do conversions between client time and UTC occur?

A

As close to the user as possible.

For web apps, such as Elab, this is the UI layer. APIs will generally choose to simply pass date times through, unless presenting a finished object, such as a report from a report engine. For integrations, this will be a consideration as data is consumed from API or file, or similar.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Elab 7.20 Upgrade

What timezone standard is implemented?

A

IANA
This has the widest technological support, and fits best with future product plans.
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Elab 7.20 Upgrade

What settings control which timezone client time is set to?

A

Each user has an independent timezone selection. The location will also require a timezone selection.

The timezone a client is currently in is checked at time of login.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Elab 7.20 Upgrade

When would a location based timezone be used?

A

When a user is not known.

For example, when a report is issued, this is typically run by the queue/job processor. Integrations, such as those in Nodered, will generally not be user aware, either.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Elab 7.20 Upgrade

Can a field be a datetime in the LIMS, but a date in the portal? Or vice-versa?

A

Not without erroneous behavior.

Take collection dates. Elab treats these as date times. Some portals present these as dates. If a user enters the date into elab, and it is not converted to client time in the portal, it may show a different date altogether, relative to Elab UI.

Note that internal usage is also required to be consistent. For example, sample completed dates are set automatically when all tests are completed. This is stored in UTC as a datetime by code. If one were to try to present as a date, which does not convert, the date shown will not always be correct, as it is using the UTC date as is.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Elab 7.20 Upgrade

What custom layer date functionality is converted by upgrade?

A

All date time data is converted to UTC
All varchar data is converted to Nvarchar (can store unicode)
All database code is formatted and switched from varchar to nvarchar, and getdate() switched to getutcdate().
All inserts into tables that now use identities are adjusted to get ID from scope_identity.
Library references in cs_scripts and user exits are adjusted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Elab 7.20 Upgrade

What custom layer datetime functionality is not converted by upgrade?

A

Integrations, custom tasks, any SQL in sql jobs, reports (AR and Excel), APIs, portal code.

Date formatting in procs. Dynamic sample number references. Inline SQL in user exits or cs_scripts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Elab 7.20 Upgrade

Look and feel has changed. Will custom layer UI elements be auto-upgraded?

A

No. “Wonky” buttons are likely.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Elab 7.20 Upgrade

How would one adjust the format of date time in UI?

A

Elab Configurations (often, but not always, called “current configuration” in the menu):
- “Date Time Format” is for elab UI
- “Export to Excel DateTime format” is for excel exports (not reports)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Elab 7.20 Upgrade

Does adjusting format of date time UI impact the 24h based time inputs?

A

No. Time inputs will still use a 24 hr format.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Elab 7.20 Upgrade

What must be present in Excel based report templates to convert date times?

A

On the “Lookup” tab of the spreadsheet template, the data type of “DateTime” must be specified for those columns that are date times.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Elab 7.20 Upgrade

May one format date times in database logic or storage?

Dev only

A

No. Formatted date times are strings, and are not converted by the layers that handle such.

Dev only

17
Q

May conversion of date times ever occur in the database logic?

Dev only

A

Almost never.

The only current exception is dynamic numbering. A future release will need to find a way to re-engineer this.

Dev only

18
Q

Elab 7.20 Upgrade

How would one provide a separate date and time on a list screen the client uses to export to Excel?

Dev only

A

A new Elab data type is provided: Date_Time_fm

With this, the databas is expected to send the date time, unchanged. Aliases may be used to present the same data for multiple columns. The default value of the table column is used to specify the format the data should use.

This is for list pages, especially those that are used to export data. These fields should be set to be non-editable.

Dev only

19
Q

Elab 7.20 Upgrade

Do reports require scripting to convert date times?

A

Yes. Data from the database should come as datetime. Each field then requires a script to convert to present the client time appropriately.

20
Q

Elab 7.20 Upgrade

Where would one go to find functions available in report scripting?

Dev only

A

The Elab Space in Confluence has 7.20 specific developer notes. Confluence training documents will be updated at time of release.

Dev only

21
Q

Elab 7.20 Upgrade

Should the DB be capable of saving unicode characters for all text fields from 7.20 and higher?

A

Yes

Specifically, varchar fields are no longer permissible, except in extremely rare cases. All should be nvarchar.

22
Q

Elab 7.20 Upgrade

Is there a list of things that should be carefully stepped through on a client upgrade?

Dev only

A

Yes. The readme file in the release has this.

Dev only

23
Q

What library is used in elab front end for timezone handling?

Dev only

A

luxon
moment has been deprecated by maintainers.

Dev only

24
Q

Elab 7.20 Upgrade

What library is used in .Net code for timezone handling?

Dev only

A

NodaTime

Dev only

25
Q

Elab 7.20 Upgrade

Does timezone handling in elab depend on interactions with elab.net and sessions?

Dev only

A

Yes. Time conversion services from .net and NodaTime are used directly by Elab server side code. User information maybe exchanged via session data.

Dev only

26
Q

Elab 7.20 Upgrade

What config key must be set correctly in order for Elab.Net to be properly aware of session?

Dev only

A

In web.config, ASPSessionVarSite should be an empty string, unless a custom handler is provided.

Dev only

27
Q

Elab 7.20 Upgrade

Where does the Elab UI preferentially determine data types for datetime conversions from?

A

The Elab data type.
- Custom attributes have a dropdown for this
- This is part of a column definition when working with screen designer / metadata.

28
Q

Elab 7.20 Upgrade

Did “date” fields in pre elab 7.20 show times? Is there a change?

A

Yes. There were places that times would appear for dates, esp on some list pages. All COTS formatted Elab dates will no longer show times in any situation. If needed, a date time should be used, instead.

29
Q

Elab 7.20 Upgrade

How will the GraphQL API (Sciforge) handle date times?

Dev only

A

For the most part, it is expected to pass datetimes through to API consumer unchanged. However, when report engine is used to provide a report, a location must be provided, such that conversions can occur.

The API code has been forked for pre-7.20 and 7.20+. Upgrades must switch to the correct code base.

Dev only

30
Q

Elab 7.20 Upgrade

What changes are needed for the ELN for 7.20 and higher?

Dev only

A

The ELN code is backwards compatible, however, there is an environment variable that must be set in order for it to determine whether it should expect UTC times from database.

Dev only

31
Q

Elab 7.20 Upgrade

Is dynamic SQL upgraded by the process to use utc dates, and nvarchar storage?

(dev only)

A

No. The lexer/parser that examined code sees dynamic sql as a string, and cannot parse it as it does SQL code.