Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit e0ff01f

Browse files
clean up
1 parent 3a37d9c commit e0ff01f

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

src/services/legacyChallengeReviewService.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,8 @@ const QUERY_GET_ITERATIVE_REVIEW_RESOURCE_FOR_CHALLENGE = `SELECT limit 1 resour
1616

1717
const QUERY_CREATE_REVIEW = 'INSERT INTO review (review_id, resource_id, submission_id, project_phase_id, scorecard_id, committed, score, initial_score, create_user, create_date, modify_user, modify_date) values (?,?,?,?,?,?,?,?,?,CURRENT,?,CURRENT)'
1818

19-
/**
20-
review_id is a new ID using idGenerator
21-
resource_id, as near as I can tell, should be the universal Id of the resource, not the challenge or project specific IDs used for roles and resources.
22-
submission_id, the most important item, which you should have.
23-
project_phase_id, try null, or any phase that overlaps in time with the challenge phase the reviews are submitted for. I can't find any logic or constraints for this field.
24-
scorecard_id, the second most important item, which you should have.
25-
committed, in the case of a TopGear batch review submission should be true.
26-
score and initial_score are usually aggregated by OR and AP, but you could aggregate them yourself, according to the scorecard weights. Try having AP do it for you.
27-
create_user should be some generic API user name that tells us it was a TopGear batch upload.
28-
create_date should be now (use CURRENT for Informix SQL if you want).
29-
modify_user and modify_date can be null (or just don't include those in the field list).
30-
The ? are just placeholders for your values. I believe Informix uses a single quote for strings.
31-
*/
32-
3319
const QUERY_CREATE_REVIEW_ITEM = 'INSERT INTO review_item (review_item_id, review_id, scorecard_question_id, upload_id, answer, sort, create_user, create_date, modify_user, modify_date) values (?,?,?,?,?,?,?,CURRENT,?,CURRENT)'
3420

35-
/*
36-
review_item_id, use your idGenerator ID.
37-
review_id, the review ID from the previous query.
38-
scorecard_question_id, the most important field, which you should have.
39-
upload_id, this is specific to the submission_id, although you could have multiple uploads and you will want the upload_id, which TopGear should have if someone answered a question about a submission, because the submission must have been downloaded from somewhere.
40-
answer, usually a number.
41-
sort, use a constant here if you wish. From what I can tell, this would be used to display certain comments at the top for review appeals. It may have a default sort from the scorecard definition, but it's probably not important since people won't be looking at individual reviews much, I'm guessing.
42-
Same as above for create_user, etc.
43-
*/
44-
4521
const QUERY_GET_SUBMISSION = 'SELECT FIRST 1 * FROM submission s INNER JOIN upload u on s.upload_id = u.upload_id WHERE u.project_id = %d AND upload_status_id = 1 AND submission_status_id = 1 ORDER BY u.CREATE_DATE ASC'
4622

4723
const QUERY_GET_PROJECT_PHASE = 'select pc.parameter scorecard_id, pp.project_phase_id project_phase_id from project_phase pp inner join phase_criteria pc on pc.project_phase_id = pp.project_phase_id where pp.project_id = %d and pp.phase_type_id = 18 and phase_criteria_type_id = 1'

0 commit comments

Comments
 (0)