Skip to content

Commit 77aaad5

Browse files
author
Gayathri Athreya
committed
Merge pull request #1609 from blackcathacker/prop_ynq
RESKC-1233:PropDev YNQ conversion script
2 parents c022468 + 1b128c6 commit 77aaad5

File tree

7 files changed

+570
-1
lines changed

7 files changed

+570
-1
lines changed

coeus-db/coeus-db-data-conv/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ WARNING: The following awards were affected by duplicate transactions. (200086-0
107107

108108
All `award_amount_info` removed during this process are copied into a table named `award_amount_info_dups` if data from this process needs to be reviewed or restored based on review.
109109

110+
Proposal YNQ -> Questionnaire Conversion (proposal-ynq)
111+
112+
During the Kuali Coeus 6.0 release, Proposal Development YNQs were deprecated. This conversion will take any previously answered YNQs and turn
113+
them into deprecated questionnaires allowing the viewing of Proposal and Personnel certification questions from these YNQs. Proposal YNQs are
114+
converted into a questionnaire named 'Proposal Converted YNQs' and personnel certification questionnaire is named 'Certification Converted
115+
YNQs'. A new version of these questionnaires are added based on the questions available and answered for each proposal so many versions of each
116+
questionnaire can be created. Finally a questionnaire version which disables the usage of the questionnaire ensuring that these deprecated
117+
questionnaires do no show up in new proposals. In the database these YNQ are stored in a copy of the original tables at 'eps_prop_ynq_bak' and
118+
'eps_prop_pers_ynq_bak'.
119+
110120
IRB (irb)
111121

112122
For future use

coeus-db/coeus-db-data-conv/src/main/java/org/kuali/coeus/dc/CliOptions.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ public boolean containsSubawardAmountInfo() {
114114
public boolean containsTimeAndMoneyDups() {
115115
return contains("tm-dups");
116116
}
117+
118+
public boolean containsProposalYnq() {
119+
return contains("proposal-ynq");
120+
}
117121

118122
private boolean contains(String name) {
119123
for (String arg : args) {

coeus-db/coeus-db-data-conv/src/main/java/org/kuali/coeus/dc/CliOptionsBasedDaoFactory.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import org.kuali.coeus.dc.common.db.*;
2828
import org.kuali.coeus.dc.pprole.ProposalPersonRoleDao;
2929
import org.kuali.coeus.dc.pprole.ProposalPersonRoleDaoImpl;
30+
import org.kuali.coeus.dc.propynq.ProposalYnqConversionDao;
31+
import org.kuali.coeus.dc.propynq.ProposalYnqConversionDaoImpl;
3032
import org.kuali.coeus.dc.questseq.QuestSeqDao;
3133
import org.kuali.coeus.dc.questseq.QuestSeqDaoImpl;
3234
import org.kuali.coeus.dc.subaward.SubAwardAmountInfoDao;
@@ -167,6 +169,12 @@ public AwardAmountInfoDuplicatesDao getAwardAmountInfoDuplicatesDao() {
167169
dao.setConnectionDaoService(getConnectionDaoService());
168170
return dao;
169171
}
172+
173+
public ProposalYnqConversionDao getProposalYnqConversionDao() {
174+
ProposalYnqConversionDaoImpl dao = new ProposalYnqConversionDaoImpl();
175+
dao.setConnectionDaoService(getConnectionDaoService());
176+
return dao;
177+
}
170178

171179
public CliOptions getCliOptions() {
172180
return cliOptions;

coeus-db/coeus-db-data-conv/src/main/java/org/kuali/coeus/dc/Main.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ public static void main(String[] args) {
136136
if (options.containsTimeAndMoneyDups()) {
137137
factory.getAwardAmountInfoDuplicatesDao().fixAwardAmountInfoDuplicates();
138138
}
139+
140+
if (options.containsProposalYnq()) {
141+
factory.getProposalYnqConversionDao().convertProposalYnqs();
142+
}
139143

140144
if (options.containsDryRun()) {
141145
coeusConnection.rollback();
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.kuali.coeus.dc.propynq;
2+
3+
public interface ProposalYnqConversionDao {
4+
5+
void convertProposalYnqs();
6+
7+
}

coeus-db/coeus-db-data-conv/src/main/java/org/kuali/coeus/dc/propynq/ProposalYnqConversionDaoImpl.java

Lines changed: 534 additions & 0 deletions
Large diffs are not rendered by default.

coeus-db/coeus-db-sql/src/main/resources/co/kuali/coeus/data/migration/sql/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ For embedded mode databases that are being maintained and upgraded separately fr
3737
##Custom Java Database Conversion Process
3838
Finally KC has a few more complicated and cross KC->Rice database conversions included. These conversions could not be done through plain sql similarly to the rest of these conversions due to the complicated nature to trying to transfer data between KC and Rice databases for embedded mode instances. Information on running these scripts can be found in this [README.md](../../../../../../../../../../coeus-db-data-conv/README.md) file.
3939

40-
There are currently 5 custom conversion processes and they should be run as follows. Each conversion type supported by the database conversion process should only be run once when upgrading a database.
40+
There are currently 7 custom conversion processes and they should be run as follows. Each conversion type supported by the database conversion process should only be run once when upgrading a database.
4141

4242
* Proposal (proposal) after all 600* scripts are run
4343
* Proposal Person Role (pprole) after all 600* scripts are run
4444
* KRMS Question & Questionnaire Sequence (questseq) after the 1505* scripts are run
4545
* Time & Money Document Status (tmdocstatus) after the 1507* scripts are run
4646
* Subaward Amount Info (subaward-amountinfo) after the 1511* scripts are run
47+
* Time And Money Award Amount Info Duplicate Removal (tm-dups) after the 1603* scripts are run
48+
* Proposal YNQ -> Questionnaire Conversion (proposal-ynq) after the 1603* scripts are run
4749

4850

4951
##Mysql Specifics

0 commit comments

Comments
 (0)