Migrate fellowship proposal reviews
hypha.apply.review.management.commands.migrate_fellowship_proposal_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}}}
STREAMFIELD_MAP
class-attribute
instance-attribute
¶
STREAMFIELD_MAP = {'field_fr_overall_no': {'id': 'e68b6fe9-8b11-4cf0-8ae4-2ffed75e1e80', 'type': 'value', 'key': 'safe_value'}, 'field_fr_overall_yes': {'id': 'a413f3a2-b486-4bf3-9e2d-c48d19626876', 'type': 'value', 'key': 'safe_value'}, 'field_fr_feedback': {'id': 'comments', 'type': 'value', 'key': 'safe_value'}, 'field_fr_request_questions': {'id': '536c963a-f183-45bc-b83f-458b46dc5542', 'type': 'merge_value', 'key': 'safe_value'}}
REQUEST_QUESTION_MAP
class-attribute
instance-attribute
¶
REQUEST_QUESTION_MAP = {'3618': {0: 'Are the project objectives and timeline realistic?', 1: 'Should additional collaboration be included?', 2: 'Are the proposed outputs tailored to improve the likelihood of third party use such as utilizing more digestible and short form formats?', 3: 'Are there clear means of assessing the success of the project?', 4: 'General Comments'}}
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},]