Closed dan-tang-ssd closed 8 months ago
Inclusion of 'portfolios' table in SQL Query A new element called a "left join" has been added to the SQL query in the 'generate_dashboard_summary.sql' file. This helps the system bring together information from another table, specifically the 'portfolios' table, when creating the dashboard summary.
Filtering of Results There's an added condition in the same SQL query which will filter the results further. This filter works on the 'contributes_to_funding_flow' column in the 'portfolios' table. This means, the system will now show results that meet certain criteria regarding funding flow when generating the dashboard summary.
Performed testing in local env, with positive testing result.
BEFORE program change:
AFTER program change:
Test Case in local env:
Company A
Company B
Screen shots BEFORE program change, all initiatives are included:
Company A
Company B
Screen shots AFTER program change, only initiatives in portfolios that are contributing to funding flow are included.
All previously created portfolios are not contributing to funding flow. There are only two newly create portfolios are contributing to funding flow. Each portfolio has only one initiative.
Company A
Company B
During my testing, I notice that in "Summary of Initiatives", we show a new line for "Failed at least one red flag". However, there is no corresponding help_text_entries record for it. So it is now showing nothing when mouseover it.
I have created a new record for it in local database via TablePlus. May I seek your advice for the best practice to handle this in live env?
We have below possible options, each with pros and cons, it seems there is no best choice here yet...
We have below possible options, each with pros and cons, it seems there is no best choice here yet...
You're right - there's no clear winner here for the options. I guess that's a limitation of having these strings in the database. A possible long-term option would be to make these help strings a json file, and then they can be stored and updated in the codebase. For now, I think probably options 1 or 3 are best - as you say, running Seeders on the live database is quite risky!
For the change - I think changing the SQL procedure is a sensible solution. I think only the others should be automatically filtered in this way. For now, we should continue to show all the initiatives of the current institution, even ones in portfolios that aren't contributing to the global analysis. Otherwise I think it will be confusing to some people ("I put in 5 initiatives and don't see any of them on the dashboard..."). Users can still filter by portfolio, so if they have a portfolio of tests and a "real" portfolio they can still filter out the tests manually.
Thanks!
Revised stored procedure as suggested.
Screen shot:
BEFORE:
AFTER:
Nice - thanks!
This PR is submitted for fix #244.
This PR contains one change:
In dashboard, we get initatives regardless whether it's portfolio is contributing to funding flow or not. I assume it will be the default way for getting initiatives in dashboard for comparison. Therefore I added a condition in stored procedure related SELECT SQL directly. If we add a new filter in dashboard Vue component, user will need to select it everytime.
Um... probably we can add a new filter selection box, with 3 options:
I am not quite sure whether it will increase complexity and create possible confusion. So... I stick with the current approach first.