stats4sd / aec_portfolio

A proof of concept for the AEC Consortium Project Management / Assessment System
GNU General Public License v3.0
0 stars 0 forks source link

Live Env Deployment #262

Closed dan-tang-ssd closed 3 months ago

dan-tang-ssd commented 7 months ago

Hi Dave,

This PR contains many program changes since Jan 2024.

I am not quite sure which option we should go now, would you kindly advise?

  1. Deploy all program changes to live env, perform testing to confirm everything changed is working fine
    • Many changes to list here, please refer to "Commits" section of this PR for details
  2. Only deploy the bug fix in branch "fix-dashboard-unexpected-message" (checkout main branch then make delta change)
    • Resolve the unexpected message
    • Exclude previously completed assessments in dashboard
what-the-diff[bot] commented 7 months ago

Warning What The Diff skipped summarizing this PR.

The estimated token count of your changes is 12,336. Your configured maximum tokens per PR is 10,000.

Login to change the settings, or manually trigger a comment here.

dave-mills commented 7 months ago

Looking at the staging site, this seems to work well for creating / editing initiatives. I think this is good to publish.

Once this is deployed, we still have some pending items:

  1. We need to fill the gaps in the exchange rates table. Probably the easiest approach is to do this 'manually' in a local version, and then copy the results to live.
  2. After that, we will need to run the command to add the "budget_eur" and "exchange_rate_eur" to all existing projects.
dan-tang-ssd commented 7 months ago

One note - this will break the budget filters on the dashboard until all existing projects have a budget_eur value.

I suggest we prepare the database table of legacy exchange rates before merging this, so we can then:

* merge this PR and deploy to live

* update the exchange_rates table with daily exchange rates for every day from now back till... Jan 01 2011 (the earliest date for real existing projects).

* run the command to populate budget_eur

... at pretty much the same time.

Thank you Dave. Yes, it sounds great.

I will start to retrieve historical exchange rates year by year in my local env first. I will keep you update for progress.

dan-tang-ssd commented 3 months ago

Assessment 1

I have reviewed project's currency in live db, found below issue and took follow-up actions:

  1. Project with currency "chf"; Manually update chf to CHF
  2. Project with currency "R$"; Manually update R$ to BRL
  3. Project with start date which is a future date, i.e. 2025-08-01. This project has been assessed red flag only. It has not been included in dashboard now. No action required.
    • Question: if a project has not started yet, how do users assess it...?

P.S. For chf and R$, I suppose user should be fine for this arrangement as the manual entered currency is an existing option in currency selection box.


Assessment 2

I have also checked the distinct currency and distinct project start date, then check whether we have corresponding exchange rate record from project currency to EUR. There are 42 distinct records and we have exchange rate records for them.

Suppose projects.budget_eur, projects.exchange_rate_eur can be filled in successfully for all projects after running the one-time command program after live env deployment.


Proposed live env deployment schedule: 2024-07-17 (Wed) 9:30 AM

I think we are ready for live env deployment now.

Just to pay safe to do it in morning time. In case any unexpected issue occurred, we can have more time during office hour to get it fixed.

dave-mills commented 3 months ago

Question: if a project has not started yet, how do users assess it...?

The assessment is about how well the project aligns with AE principles, which can be done based on the project proposal or plan. Often, this is the way people will assess portfolios and budgets, and then they might do another assessment during or after the project to explore how AE-aligned the project actually was.

dan-tang-ssd commented 3 months ago

Live env deployment is completed. Manually run command to calculate projects.budget_eur and projects.exchange_rate_eur. Performed testing in dashboard with positive testing result.