Migrate concept reviews
hypha.apply.review.management.commands.migrate_concept_reviews
¶
Command
¶
Bases: MigrateCommand
help
class-attribute
instance-attribute
¶
REVIEWFIELD_MAP
class-attribute
instance-attribute
¶
REVIEWFIELD_MAP = {'community_lab_review': {'submission': 'field_review_community_lab', 'recommendation': 'field_clr_recommendation', 'rec_map': {'1': 2, '0': 0}}, 'concept_note_review': {'submission': 'field_review_concept_note', 'recommendation': 'field_pr_recommendation', 'rec_map': {'2': 1, '1': 2, '0': 0}}, 'proposal_review': {'submission': 'field_review_proposal', 'recommendation': 'field_pr_recommendation', 'rec_map': {'2': 1, '1': 2, '0': 0}}, 'fellowship_application_review': {'submission': 'field_review_fellowship_app', 'recommendation': 'field_fr_overall_rate', 'rec_map': {'5': 2, '4': 2, '3': 1, '2': 0, '1': 0}}, 'fellowship_proposal_review': {'submission': 'field_review_fellowship', 'recommendation': 'field_fr_overall_rate', 'rec_map': {'5': 2, '4': 2, '3': 1, '2': 0, '1': 0}}, 'rapid_response_review': {'submission': 'field_review_rapid_response', 'recommendation': 'field_rrr_recommend', 'rec_map': {'3': 2, '2': 1, '1': 0}}}
ROUND_NAME
class-attribute
instance-attribute
¶
STREAMFIELD_MAP
class-attribute
instance-attribute
¶
STREAMFIELD_MAP = {'field_pr_recommendation_comments': {'id': 'f16be0b3-ef02-4876-b056-8a84238b1a52', 'type': 'value', 'key': 'safe_value'}, 'field_cnr_principles_rate': {'id': '6dd8d5d2-09a5-4681-aebc-eb9ccd00395a', 'type': 'score'}, 'field_cnr_technical_rate': {'id': '52b1f53c-9656-4b0c-8b8b-a9c57869356d', 'type': 'score'}, 'field_field_cnr_sustainable_rate': {'id': 'aedb27e7-6044-4e04-b2c7-358065c8fe5c', 'type': 'score'}, 'field_cnr_principles': {'id': '6dd8d5d2-09a5-4681-aebc-eb9ccd00395a', 'type': 'placeholder'}, 'field_cnr_technical': {'id': '52b1f53c-9656-4b0c-8b8b-a9c57869356d', 'type': 'placeholder'}, 'field_cnr_sustainable': {'id': 'aedb27e7-6044-4e04-b2c7-358065c8fe5c', 'type': 'placeholder'}, 'field_cnr_request_questions': {'id': '84405ba2-f94e-4d4d-92e1-190bd802f858', 'type': 'merge_value', 'key': 'safe_value'}, 'field_cnr_comments': {'id': 'comments', 'type': 'value', 'key': 'safe_value'}}
REQUEST_QUESTION_MAP
class-attribute
instance-attribute
¶
REQUEST_QUESTION_MAP = {'3618': {0: 'Do the Goals and principles of the application align with the program?', 1: 'Does the application propose a unique contribution to the relevant field?', 2: 'Do you consider the application reasonable and realistic?', 3: 'General Comments'}, '3681': {0: 'What are the positive aspects of this application?', 1: 'What are the negative aspects of this application?', 2: 'What items must the applicant address, if any?'}}
add_arguments
¶
handle
¶
Source code in hypha/apply/review/management/commands/migration_review_base.py
process
¶
Source code in hypha/apply/review/management/commands/migration_review_base.py
get_user
¶
get_field_value
¶
Handles the following formats: field: {(safe_)value: VALUE} field: {target_id: ID} -- Drupal ForeignKey. Reference to other node or user entities. field: {tid: ID} -- or term ID. fk to Categories field: [] field: [{value|target_id|tid: VALUE},]