Can you map phaseId from database to Phase State
I'm currently working with XML files containing dumps of the database. One of the things I want to do is link Reviews with their phase state. The ReviewData table has an attribute called phaseId, and the Database Schema on the site indicates there's a phase table, though there isn't one among the dumped tables I'm working with. I've also tried checking a reviewId from the table against that review in the browser gui and matching the state seen there to the phaseId value. However, I've noticed that the phaseId isn't consistently one value or another for that state.
phaseId = 2 is listed for several reviews, even though each review is in a different phase state than the other. I saw Cancelled, Inspection and Completed. Phase 1 seemed more consistent, always being either Planning or Inspection, but I don't know if that's always the case or coincidence.
Is there a Phase table? Or some reliable way to map the phaseId in the database to the actual state of the review?
Solved! Go to Solution.
The Collaborator database schema is published in our online documentation. Here's the link to that information: Collaborator Database Schema
The Phase_Title is the column you are looking for in this case. It is found in the Views of the schema rather than the Tables. The schema image highlights the connecting attribute from the review table to the phase view where you can map the the phase_id to the phase_title.
Thanks for your response. Currently the data I'm working with is just a set of XML files dumped from the SQL database, so I'm not sure how I'd go about accessing the Views. Is this something I'd have to reach out to my DB administrator for?
I'm not sure what SQL version you are using, or the process you're using to grab your XML dump, but from MySQL using the Workbench to grab the data, I can export it and have Views in the export by default. We can see the phase view show in my export list. A table contains data, a view is just a SELECT statement which has been saved in the database (more or less, depending on your database).