UserOfficeProject / issue-tracker

Shared place for features and bugs from all collaborators.
0 stars 0 forks source link

Proposal pdfs not showing historic data of users #1161

Open deepaksftc opened 1 week ago

deepaksftc commented 1 week ago

Came in as an urgent issue from support.

PDFs are being generated by the new proposal system with the investigator's CURRENT organization rather than their organization at the time the proposal was submitted. This means we have a situation where a proposal PDF can change each time it is loaded or viewed. They should be static

Example: image

deepaksftc commented 1 week ago

I was looking into different suggestions and possible solution for this. I couldn't find a good solution yet. Initial thought was to make use of any already downloaded pdfs of completed rounds and migrate it to new db. But it seems like we don't store all the proposal pdfs after every round for the new system. And the second thought was to store at least the organisation name in users table (new db) and make use of it for generating pdf. But, in this case also we will face same issue in future as we can keep only 1 entry per user in table as per current design. So, if the user changes the institution in future, that won't be reflected. I am currently trying to find a rough count of users that changed the organisation in last 4 years. It looks like nearly 924 users changed their institution and around 2800 proposals are linked to these users in new system. Not sure if I am checking it in right way though. I am planning to start with the development to start generating and storing the pdfs in new db after every round close.

Scheduled call with team to discuss on this.

deepaksftc commented 2 days ago

As per the discussion:

  1. For existing proposals, a new migration script will be written to store the already generated pdfs to database. (This will be done as part of this issue)
  2. It's decided to store the static version of proposal pdfs in database after every call close. This will be done as part of https://github.com/UserOfficeProject/issue-tracker/issues/1168 and https://github.com/UserOfficeProject/issue-tracker/issues/1169