Is there a mapping for various database values to what they show up as in the web UI?

Describe the issue or problem

In the MySQL tables, are the libraries for what various values in the ID fields mean, and how they show up in the web UI? For instance the “edit_decisions” table, there is the “decision” columns with a number value. Where can I find tables to tell me what the values pertain to?

I’ve looked at the database schema, and do not see any relations where there is a library of the IDs matching what is shown in the UI (Declined, Sent to Reviewed, etc, for instance). So, how does the web UI know that value X = Declined, for instance. There must be lookup tables somewhere for these types of data?

Steps I took leading up to the issue
Various mysqsl queries.

What application are you using?
MySQL queries

Additional information

Hi @guitman444,

In the current main branch, there’s a comment on the edit_decisions table that reads:

A numeric constant indicating the decision that was taken. Possible values are listed in the Decision class.

The Decision class is implemented here and there are constants that define the possible values.

I’m actually experimenting at the moment with a tool called Metabase to allow point-and-click exploration and report generation from OJS; part of configuring Metabase includes giving human-friendly values in place of numeric constants. See that progress (and the lists of constant values for each column) over here:

I hope to record a presentation on OJS and Metabase fairly soon; stay tuned for that.

Alec Smecher
Public Knowledge Project Team

Ahh thank you, so these mapping are all within classes in the code, and not anywhere in the database? In this case, I will have to do some digging to collect these mapping from various classes, create my own tables do I can perform joins on those so I can create my custom reports.

Looking forward to seeing your metabase project!

This topic was automatically closed after 12 days. New replies are no longer allowed.