BCcampus / open-sage

Theme for open.bccampus.ca
MIT License
1 stars 0 forks source link

Adoption stats: Change name of a school on adoption form #209

Closed josieg closed 5 years ago

josieg commented 5 years ago

Apologies if this isn't the right place to put this.

Context Northwest Community College (NWCC) changed their name to Coast Mountain College (CMTN) last year and we would like that name change to be reflected in the adoption form. Adoptions reported through the form are used to generate adoptions/savings stats.

Problem Lauri is able to change the name on the form, but based on past conversations with Brad, Lauri says that if she just removes NWCC from the institutions drop-down list on the adoption form and adds CMTN, it will result in the loss of adoption info for NWCC that has been collected through the form to date.

Request Alex, can you make it so we can remove mention of NWCC from the adoption form and add CMTN, without losing that adoption info? The preferred outcome would be that adoptions reported under NWCC and CMTC would be grouped together in the backend, whatever that looks like.

Let me know if you need any further clarification.

alex-418 commented 5 years ago

Determined a solution with @josieg that updating the following line in the back-end is needed to attach the baseline under the new name, and then updating old entries in the database to use the new name, this way it is all counted under the new name. https://github.com/BCcampus/opentextbooks/blob/a8a1f33428e7b205280483fede7226e0dc28d110/inc/models/class-webform.php#L88

alex-418 commented 5 years ago

@josieg I've updated the production database to replace the entires with "Northwest Community College" to "Coast Mountain College". You can now update the name in the adoptions form. I also updated the baseline name in https://github.com/BCcampus/opentextbooks/commit/c8a67cb94da564e61beec7ff83ee9095a9b37f20 so that everything will now get calculated just like before under the new name.

josieg commented 5 years ago

Awesome! Lauri will update the form