From 4f8befd8b3d3f7696bd65dbc51ab29a47a81b3d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Sun, 11 Dec 2022 00:25:32 -0400 Subject: [PATCH 01/14] Correct checkin websocket messages from backend --- tabbycat/api/views.py | 5 ++--- tabbycat/checkins/views.py | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tabbycat/api/views.py b/tabbycat/api/views.py index ee53ec379e0..8d7f44760ed 100644 --- a/tabbycat/api/views.py +++ b/tabbycat/api/views.py @@ -326,9 +326,8 @@ def broadcast_checkin(self, obj, check): group_name = CheckInEventConsumer.group_prefix + "_" + self.tournament.slug async_to_sync(get_channel_layer().group_send)(group_name, { 'type': 'send_json', - 'data': { - 'checkins': [checkin_dict], - }, + 'checkins': [checkin_dict], + 'created': check, }) return checkin diff --git a/tabbycat/checkins/views.py b/tabbycat/checkins/views.py index 8138be7aadf..43ebd90fb63 100644 --- a/tabbycat/checkins/views.py +++ b/tabbycat/checkins/views.py @@ -273,6 +273,7 @@ def post(self, request, *args, **kwargs): existing_checkin = get_unexpired_checkins(t, 'checkin_window_people').filter(identifier=identifier) action = request.POST.get('action') + created = action == 'checkin' if action == 'revoke': if existing_checkin.exists(): existing_checkin.delete() @@ -281,7 +282,7 @@ def post(self, request, *args, **kwargs): else: messages.error(request, _("Whoops! Looks like your check-in was already revoked.")) return super().post(request, *args, **kwargs) - elif action == 'checkin': + elif created: if existing_checkin.exists(): messages.error(request, _("Whoops! Looks like you're already checked in.")) return super().post(request, *args, **kwargs) @@ -298,9 +299,8 @@ def post(self, request, *args, **kwargs): async_to_sync(get_channel_layer().group_send)( group_name, { 'type': 'send_json', - 'data': { - 'checkins': [checkin_dict], - }, + 'checkins': [checkin_dict], + 'created': created, }, ) From d22df66aa54376450b5cd447a75e1cbccdd9886a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Sat, 17 Dec 2022 14:20:15 -0400 Subject: [PATCH 02/14] Validate no speeches as an empty list Fixes BACKEND-AVN --- tabbycat/api/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tabbycat/api/serializers.py b/tabbycat/api/serializers.py index c898c18be00..b7dbabff7bd 100644 --- a/tabbycat/api/serializers.py +++ b/tabbycat/api/serializers.py @@ -1123,8 +1123,8 @@ def save(self, **kwargs): def validate(self, data): # Make sure the score is the sum of the speech scores score = data.get('score', None) - speeches = data.get('speeches', None) - if speeches is None: + speeches = data.get('speeches', []) + if len(speeches) == 0: if score is not None: raise serializers.ValidationError("Speeches are required to assign scores.") elif score is not None and score != sum(speech['score'] for speech in speeches): From ca5517805ffd29d8325e0549ec5eab9a4877126a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Sat, 17 Dec 2022 15:33:57 -0400 Subject: [PATCH 03/14] Search results admin by team name Rather than by reference, which is often duplicated. --- tabbycat/results/admin.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tabbycat/results/admin.py b/tabbycat/results/admin.py index 4b36da8bc2e..8ff4eb589bf 100644 --- a/tabbycat/results/admin.py +++ b/tabbycat/results/admin.py @@ -20,7 +20,7 @@ class BallotSubmissionAdmin(TabbycatModelAdminFieldsMixin, ModelAdmin): list_display = ('id', 'debate', 'version', 'get_round', 'timestamp', 'submitter_type', 'submitter', 'confirmer', 'confirmed') list_editable = ('confirmed',) - search_fields = ('debate__debateteam__team__reference', 'debate__debateteam__team__institution__name') + search_fields = ('debate__debateteam__team__short_name', 'debate__debateteam__team__institution__name') raw_id_fields = ('debate', 'motion') list_filter = ('debate__round', 'debate__round__tournament', 'submitter', 'confirmer') # This incurs a massive performance hit @@ -55,7 +55,7 @@ def resave_ballots(self, request, queryset): class TeamScoreAdmin(TabbycatModelAdminFieldsMixin, ModelAdmin): list_display = ('id', 'ballot_submission', 'get_round', 'get_team', 'points', 'win', 'score') search_fields = ('debate_team__debate__round__seq', 'debate_team__debate__round__tournament__name', - 'debate_team__team__reference', 'debate_team__team__institution__name') + 'debate_team__team__short_name', 'debate_team__team__institution__name') list_filter = ('debate_team__debate__round', ) raw_id_fields = ('ballot_submission', 'debate_team') @@ -75,7 +75,7 @@ def get_queryset(self, request): class TeamScoreByAdjAdmin(TabbycatModelAdminFieldsMixin, ModelAdmin): list_display = ('id', 'ballot_submission', 'get_round', 'get_adj_name', 'get_team', 'win', 'margin', 'score') search_fields = ('debate_team__debate__round__seq', 'debate_team__debate__round__tournament__name', - 'debate_team__team__reference', 'debate_team__team__institution__name') + 'debate_team__team__short_name', 'debate_team__team__institution__name') list_filter = ('debate_team__debate__round', 'debate_adjudicator__adjudicator__name') raw_id_fields = ('ballot_submission', 'debate_adjudicator', 'debate_team') @@ -99,7 +99,7 @@ class SpeakerScoreAdmin(TabbycatModelAdminFieldsMixin, ModelAdmin): list_display = ('id', 'ballot_submission', 'get_round', 'get_team', 'position', 'get_speaker_name', 'score', 'ghost') search_fields = ('debate_team__debate__round__abbreviation', - 'debate_team__team__reference', 'debate_team__team__institution__name', + 'debate_team__team__short_name', 'debate_team__team__institution__name', 'speaker__name') list_filter = ('score', 'debate_team__debate__round', 'ghost') raw_id_fields = ('debate_team', 'ballot_submission') @@ -122,7 +122,7 @@ class SpeakerScoreByAdjAdmin(TabbycatModelAdminFieldsMixin, ModelAdmin): list_display = ('id', 'ballot_submission', 'get_round', 'get_adj_name', 'get_team', 'get_speaker_name', 'position', 'score') search_fields = ('debate_team__debate__round__seq', - 'debate_team__team__reference', 'debate_team__team__institution__name', + 'debate_team__team__short_name', 'debate_team__team__institution__name', 'debate_adjudicator__adjudicator__name') list_filter = ('debate_team__debate__round', 'debate_adjudicator__adjudicator__name', From ef5947c360bc6e97340f46051424f8b0cbd2071b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Sun, 18 Dec 2022 00:08:57 -0400 Subject: [PATCH 04/14] Correct BallotSubmission tournament lookup When resaving ballots through Edit Database, the ballots to be resaved have to be sorted by tournament for `groupby` and prefetching. `tournament` was incorrectly used directly, while the correct path is `debate__round__tournament`. Fixes BACKEND-AVR --- tabbycat/results/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabbycat/results/admin.py b/tabbycat/results/admin.py index 8ff4eb589bf..ac41550f482 100644 --- a/tabbycat/results/admin.py +++ b/tabbycat/results/admin.py @@ -33,7 +33,7 @@ def get_queryset(self, request): Prefetch('debate__debateteam_set', queryset=DebateTeam.objects.select_related('team'))) def resave_ballots(self, request, queryset): - q = queryset.select_related('debate__round__tournament').order_by('tournament_id') + q = queryset.select_related('debate__round__tournament').order_by('debate__round__tournament_id') count = q.count() for tournament, bss in groupby(q, lambda bs: bs.debate.round.tournament): populate_results(bss, tournament) From 4b570d04918b5af12c1c4f26c8e3df36e3c822e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=E1=BA=A7n=20Trang=20Linh?= <117924295+linh-trant@users.noreply.github.com> Date: Tue, 20 Dec 2022 21:13:21 -0500 Subject: [PATCH 05/14] Remove comma after list of adjudicators (#2205) --- tabbycat/templates/allocations/DragAndDropDebate.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tabbycat/templates/allocations/DragAndDropDebate.vue b/tabbycat/templates/allocations/DragAndDropDebate.vue index 3b601f7eac5..b4dddf88b4b 100644 --- a/tabbycat/templates/allocations/DragAndDropDebate.vue +++ b/tabbycat/templates/allocations/DragAndDropDebate.vue @@ -69,9 +69,9 @@
- {{ adj.name }} Ⓒ, - {{ adj.name }}, - {{ adj.name }} Ⓣ, + {{ adj.name }} Ⓒ + , {{ adj.name }} + , {{ adj.name }} Ⓣ
From 5899c90f6286ba490596d83f03e98b78d0752879 Mon Sep 17 00:00:00 2001 From: Tran Trang Linh Date: Wed, 21 Dec 2022 19:47:32 -0500 Subject: [PATCH 06/14] Fix "no identifier" tooltips showing as id: null (#2206) This commit fixes a bug in checkin status pages where participants without an identifier show "with identifier null" rather than the message "with no assigned identifier" as previously added. This was due to the identifier being in an array rather than Number|null. In addition, the messages were modified to remove the word "assigned" as un-necessary and a new message added for speakers without identifier, saying "no id" now. The tooltips methods were refactored to avoid redundant/duplicated conditions, preferring `else`. --- .../checkins/templates/PeopleStatusMixin.vue | 36 ++++++++++--------- .../checkins/templates/VenuesStatusMixin.vue | 30 ++++++++-------- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/tabbycat/checkins/templates/PeopleStatusMixin.vue b/tabbycat/checkins/templates/PeopleStatusMixin.vue index 7180fcf058a..dcaf73aafaa 100644 --- a/tabbycat/checkins/templates/PeopleStatusMixin.vue +++ b/tabbycat/checkins/templates/PeopleStatusMixin.vue @@ -30,26 +30,30 @@ export default { }, methods: { getToolTipForPerson: function (entity) { - if (!this.teamCodes && entity.type !== 'Team' && entity.institution === null && entity.identifier !== null) { - const subs = [entity.name, entity.type, entity.identifier[0]] - return this.tct('%s, a %s of no institutional affiliation with identifier of %s', subs) - } - if (!this.teamCodes && entity.type !== 'Team' && entity.institution === null) { - const subs = [entity.name, entity.type] - return this.tct('%s, a %s of no institutional affiliation with no assigned identifier', subs) - } - if (!this.teamCodes && entity.type !== 'Team' && entity.identifier !== null) { - const subs = [entity.name, entity.type, entity.institution.name, entity.identifier[0]] - return this.tct('%s, a %s from %s with identifier of %s', subs) - } if (!this.teamCodes && entity.type !== 'Team') { - const subs = [entity.name, entity.type, entity.institution.name] - return this.tct('%s, a %s from %s with no assigned identifier', subs) + if (entity.institution === null) { + if (entity.identifier[0]) { + const subs = [entity.name, entity.type, entity.identifier[0]] + return this.tct('%s, a %s of no institutional affiliation with identifier of %s', subs) + } else { + const subs = [entity.name, entity.type] + return this.tct('%s, a %s of no institutional affiliation with no identifier', subs) + } + } + if (entity.identifier[0]) { + const subs = [entity.name, entity.type, entity.institution.name, entity.identifier[0]] + return this.tct('%s, a %s from %s with identifier of %s', subs) + } else { + const subs = [entity.name, entity.type, entity.institution.name] + return this.tct('%s, a %s from %s with no identifier', subs) + } } - if (entity.speakers !== null && entity.type === 'Team') { + if (entity.speakers && entity.type === 'Team') { const speakers = [] _.forEach(entity.speakers, (speaker) => { - if (speaker.status) { + if (!speaker.identifier[0]) { + speakers.push(this.tct('%s (Absent; no id)', [speaker.name])) + } else if (speaker.status) { speakers.push(this.tct('%s (Present; id=%s)', [speaker.name, speaker.identifier[0]])) } else { speakers.push(this.tct('%s (Absent; id=%s)', [speaker.name, speaker.identifier[0]])) diff --git a/tabbycat/checkins/templates/VenuesStatusMixin.vue b/tabbycat/checkins/templates/VenuesStatusMixin.vue index ecb9dba9b61..28d74db0ef0 100644 --- a/tabbycat/checkins/templates/VenuesStatusMixin.vue +++ b/tabbycat/checkins/templates/VenuesStatusMixin.vue @@ -19,22 +19,22 @@ export default { _.forEach(entity.categories, (c) => { categories.push(c.name) }) - if (entity.categories.length > 0 && entity.identifier !== null) { - const substitutions = [entity.name, categories.join(', '), entity.identifier[0]] - return this.tct('%s (%s) with identifier of %s', substitutions) - } - if (entity.categories.length === 0 && entity.identifier !== null) { - const substitutions = [entity.name, entity.identifier[0]] - return this.tct('%s (no category) with identifier of %s', substitutions) - } - if (entity.categories.length > 0) { - const substitutions = [entity.name, categories.join(', ')] - return this.tct('%s (%s) with no assigned identifier', substitutions) - } - if (entity.categories.length === 0) { - return this.tct('%s (no category) with no assigned identifier', [entity.name]) + if (entity.categories.length) { + if (entity.identifier[0]) { + const substitutions = [entity.name, categories.join(', '), entity.identifier[0]] + return this.tct('%s (%s) with identifier of %s', substitutions) + } else { + const substitutions = [entity.name, categories.join(', ')] + return this.tct('%s (%s) with no identifier', substitutions) + } + } else { + if (entity.identifier[0]) { + const substitutions = [entity.name, entity.identifier[0]] + return this.tct('%s (no category) with identifier of %s', substitutions) + } else { + return this.tct('%s (no category) with no identifier', [entity.name]) + } } - return entity.name }, }, computed: { From f546419a6b63d185a3ea1b6d660af41cb3b7928f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Thu, 22 Dec 2022 00:25:27 -0400 Subject: [PATCH 07/14] Fix typos in user-facing text Quick stuff found in Pycharm. --- tabbycat/checkins/templates/checkin_printables.html | 2 +- .../importer/templates/simple_import_adjudicators_numbers.html | 2 +- tabbycat/importer/templates/simple_import_teams_numbers.html | 2 +- tabbycat/participants/views.py | 2 +- tabbycat/printing/templates/randomised_url_sheets.html | 2 +- tabbycat/templates/admin/style_guide.html | 2 +- tabbycat/templates/ajax/WebSocketMixin.vue | 2 +- tabbycat/templates/base.html | 2 +- tabbycat/tournaments/templates/public_tournament_index.html | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tabbycat/checkins/templates/checkin_printables.html b/tabbycat/checkins/templates/checkin_printables.html index 5a6be1c6956..16f173aed56 100644 --- a/tabbycat/checkins/templates/checkin_printables.html +++ b/tabbycat/checkins/templates/checkin_printables.html @@ -8,7 +8,7 @@ {% block page-alerts %} {% blocktrans trimmed asvar p1 %} - Each of the barcodes below is also an image file that can be download individually. If you want to download them all at once try using a 'bulk downloader' extension/plugin for your browser, such as this one (for Chrome). To download them as a list you can go to Check-Ins section of the Edit Database area and copy/paste from the relevant table. + Each of the barcodes below is also an image file that can be downloaded individually. If you want to download them all at once try using a 'bulk downloader' extension/plugin for your browser, such as this one (for Chrome). To download them as a list you can go to Check-Ins section of the Edit Database area and copy/paste from the relevant table. {% endblocktrans %} {% include "components/explainer-card.html" with type="info" %} diff --git a/tabbycat/importer/templates/simple_import_adjudicators_numbers.html b/tabbycat/importer/templates/simple_import_adjudicators_numbers.html index a1018fb3ced..36d2ac6caaf 100644 --- a/tabbycat/importer/templates/simple_import_adjudicators_numbers.html +++ b/tabbycat/importer/templates/simple_import_adjudicators_numbers.html @@ -27,7 +27,7 @@ {% blocktrans trimmed asvar p2 %} You can add up to 198 adjudicators at a time. If you have more than 198 adjudicators, split them into chunks. (Please don't try to add more than 198 - in one go; the system will crash and you will lose data.) + in one go; the system will crash, and you will lose data.) {% endblocktrans %} {% include "components/explainer-card.html" with type="info" %} diff --git a/tabbycat/importer/templates/simple_import_teams_numbers.html b/tabbycat/importer/templates/simple_import_teams_numbers.html index 12e41995b55..e1faa4ae987 100644 --- a/tabbycat/importer/templates/simple_import_teams_numbers.html +++ b/tabbycat/importer/templates/simple_import_teams_numbers.html @@ -28,7 +28,7 @@ {% blocktrans trimmed asvar p2 %} You can add up to 141 teams at a time. If you have more than 141 teams, split them into chunks. (Please don't try to add more than 141 in one go; - the system will crash and you will lose data.) + the system will crash, and you will lose data.) {% endblocktrans %} {% include "components/explainer-card.html" with type="info" %} diff --git a/tabbycat/participants/views.py b/tabbycat/participants/views.py index 80d5ba6e618..cc7a08cebb1 100644 --- a/tabbycat/participants/views.py +++ b/tabbycat/participants/views.py @@ -423,7 +423,7 @@ def post(self, request, *args, **kwargs): self.set_category_eligibility(participant, posted_info[str(participant_id)]) self.log_action() except Exception: - message = "Error handling eligiblity updates" + message = "Error handling eligibility updates" logger.exception(message) return JsonResponse({'status': 'false', 'message': message}, status=500) diff --git a/tabbycat/printing/templates/randomised_url_sheets.html b/tabbycat/printing/templates/randomised_url_sheets.html index 016b0be0fe8..e8cf1a89275 100644 --- a/tabbycat/printing/templates/randomised_url_sheets.html +++ b/tabbycat/printing/templates/randomised_url_sheets.html @@ -11,7 +11,7 @@ {% block page-alerts %}
{% blocktrans trimmed %} - This page is designed to be printed as double sided A4 sheets, with the + This page is designed to be printed as double-sided A4 sheets, with the outside facing side showing the participant name and the inside facing side showing the URL. Use CTRL-P to print; for best results use Chrome. {% endblocktrans %} diff --git a/tabbycat/templates/admin/style_guide.html b/tabbycat/templates/admin/style_guide.html index d1689b07deb..d4eac6eb152 100644 --- a/tabbycat/templates/admin/style_guide.html +++ b/tabbycat/templates/admin/style_guide.html @@ -20,7 +20,7 @@
Nav actions
{% include "components/item-action.html" with text="Nav Action Item" icon="feather" %}
-
Calls to Action (promp for necessary actions)
+
Calls to Action (prompt for necessary actions)
{% include "components/item-action.html" with url="#" alone=True text="Go to the draw area to allocate adjudicators." type="success" to_complete=True %} diff --git a/tabbycat/templates/ajax/WebSocketMixin.vue b/tabbycat/templates/ajax/WebSocketMixin.vue index 73e0e499578..b978e4a13fb 100644 --- a/tabbycat/templates/ajax/WebSocketMixin.vue +++ b/tabbycat/templates/ajax/WebSocketMixin.vue @@ -106,7 +106,7 @@ export default { }, dismissLostConnectionAlert: function () { if (this.lostConnections > 1) { // Only show modal when a connection is re-opened not opened - const explanation = `This page lost its connection to the server but has succesfully reopened + const explanation = `This page lost its connection to the server but has successfully reopened it. Changes made to data on this page will now be saved. However, you may want to refresh the page to verify that earlier changes were saved.` this.showErrorAlert(explanation, null, 'Connection Resumed', 'text-success', true, true) diff --git a/tabbycat/templates/base.html b/tabbycat/templates/base.html index fce86f5bfdc..c158654e805 100644 --- a/tabbycat/templates/base.html +++ b/tabbycat/templates/base.html @@ -119,7 +119,7 @@
- Advertisment by a Tabbycat Sponsor + Advertisement by a Tabbycat Sponsor
diff --git a/tabbycat/tournaments/templates/public_tournament_index.html b/tabbycat/tournaments/templates/public_tournament_index.html index 41fe00a7e38..3cbbad89360 100644 --- a/tabbycat/tournaments/templates/public_tournament_index.html +++ b/tabbycat/tournaments/templates/public_tournament_index.html @@ -238,7 +238,7 @@
- Advertisment by a Tabbycat Sponsor + Advertisement by a Tabbycat Sponsor
From 2436f87608f27df65519559d49ecb615cd442124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Thu, 22 Dec 2022 19:32:56 -0400 Subject: [PATCH 08/14] Fix BADENGINE npm install issue --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 40904e54097..788288c5345 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6277,7 +6277,7 @@ "reconnecting-websocket": "^3.0.3" }, "engines": { - "npm": "^5.0.0" + "npm": ">=5" } }, "node_modules/dns-equal": { From 0c64dfffc5b7c7c9630d57a71e68833cf2b94a38 Mon Sep 17 00:00:00 2001 From: Philip Belesky Date: Sat, 24 Dec 2022 10:48:41 +1100 Subject: [PATCH 09/14] Revert #2205, fix underlying issue --- .../templates/allocations/DragAndDropDebate.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tabbycat/templates/allocations/DragAndDropDebate.vue b/tabbycat/templates/allocations/DragAndDropDebate.vue index b4dddf88b4b..7d4cceec091 100644 --- a/tabbycat/templates/allocations/DragAndDropDebate.vue +++ b/tabbycat/templates/allocations/DragAndDropDebate.vue @@ -69,9 +69,16 @@
- {{ adj.name }} Ⓒ - , {{ adj.name }} - , {{ adj.name }} Ⓣ + + {{ adj.name }} Ⓒ, + + {{ adj.name }}, + + {{ adj.name }} Ⓣ, +
From 0642742e9c8767180d6c8b40dd0f8f9304f8b3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Fri, 23 Dec 2022 21:13:09 -0400 Subject: [PATCH 10/14] Add changelog for 2.7.5 --- .github/CHANGELOG.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/CHANGELOG.rst b/.github/CHANGELOG.rst index 41170e0f405..097381f7174 100644 --- a/.github/CHANGELOG.rst +++ b/.github/CHANGELOG.rst @@ -2,6 +2,19 @@ Change Log ========== +2.7.5 +----- +*Release date: TBD* + +- Fixed checkins not automatically updating through private URLs and API +- Prevented API error when creating ballot with incorrect speakers (BACKEND-AVN) +- Added ability to search results by team name, rather than by reference +- Fixed ballot resaving through Edit Database (BACKEND-AVR) +- Removed trailing commas after panels in room allocations. Thank you to Trần Trang Linh for the fix! +- Corrected missing checkin identifiers showing as "null". Thanks again to Trần Trang Linh! +- Corrected a few typos + + 2.7.4 ----- *Release date: 11 December 2022* From 663626ba7d49c3293108271d0628a3163c29f332 Mon Sep 17 00:00:00 2001 From: Philip Belesky Date: Sat, 24 Dec 2022 13:26:36 +1100 Subject: [PATCH 11/14] Remove Render instructions --- .github/CHANGELOG.rst | 1 + docs/index.rst | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CHANGELOG.rst b/.github/CHANGELOG.rst index 097381f7174..d1229e25d90 100644 --- a/.github/CHANGELOG.rst +++ b/.github/CHANGELOG.rst @@ -13,6 +13,7 @@ Change Log - Removed trailing commas after panels in room allocations. Thank you to Trần Trang Linh for the fix! - Corrected missing checkin identifiers showing as "null". Thanks again to Trần Trang Linh! - Corrected a few typos +- Removed Render installation instructions [until that servie can be reliably used] 2.7.4 diff --git a/docs/index.rst b/docs/index.rst index bb91eaa6a46..96e1f2930e5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,7 +19,6 @@ formats too. If you're looking for a general overview of the software, check out :maxdepth: 1 :caption: Installation - install/render install/heroku install/local install/docker From 0a53e811dbe4481bef58d197dec2930f9c74d180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Sun, 29 Jan 2023 19:05:07 -0400 Subject: [PATCH 12/14] Add default blank conflicts for panels --- .github/CHANGELOG.rst | 3 ++- tabbycat/templates/allocations/DragAndDropStore.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/CHANGELOG.rst b/.github/CHANGELOG.rst index d1229e25d90..9ad25af49f7 100644 --- a/.github/CHANGELOG.rst +++ b/.github/CHANGELOG.rst @@ -13,7 +13,8 @@ Change Log - Removed trailing commas after panels in room allocations. Thank you to Trần Trang Linh for the fix! - Corrected missing checkin identifiers showing as "null". Thanks again to Trần Trang Linh! - Corrected a few typos -- Removed Render installation instructions [until that servie can be reliably used] +- Removed Render installation instructions [until that service can be reliably used] +- Fixed conflicts not showing when dragging panels 2.7.4 diff --git a/tabbycat/templates/allocations/DragAndDropStore.js b/tabbycat/templates/allocations/DragAndDropStore.js index 73aa748ca1a..a87b0b5b499 100644 --- a/tabbycat/templates/allocations/DragAndDropStore.js +++ b/tabbycat/templates/allocations/DragAndDropStore.js @@ -256,7 +256,7 @@ export default new Vuex.Store({ let panelClashesCombined = { adjudicator: [], team: [], institution: []}; panelAdjIds.forEach((adjId) => { - const clashesForAdj = state.extra.clashes.adjudicators[adjId] + const clashesForAdj = state.extra.clashes.adjudicators[adjId] ?? { adjudicator: [], team: [], institution: []} for (const [key, value] of Object.entries(clashesForAdj)) { panelClashesCombined[key].push(...value); } @@ -283,7 +283,7 @@ export default new Vuex.Store({ let panelHistoriesCombined = { adjudicator: [], team: [], institution: []}; panelAdjIds.forEach((adjId) => { - const clashesForAdj = state.extra.histories.adjudicators[adjId] + const clashesForAdj = state.extra.histories.adjudicators[adjId] ?? { adjudicator: [], team: [], institution: []} for (const [key, value] of Object.entries(clashesForAdj)) { panelHistoriesCombined[key].push(...value); } From 0292e72993a6b4410f145886a7cf9f8bf0fa5b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Sat, 11 Feb 2023 16:03:30 -0400 Subject: [PATCH 13/14] Use view's tournament for participant record table As adjudicators may have a null tournament, we cannot use the object's attribute. Instead, use the view's tournament attribute to filter rounds. Fixes BACKEND-B04 --- tabbycat/participants/views.py | 6 +++--- tabbycat/privateurls/views.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tabbycat/participants/views.py b/tabbycat/participants/views.py index cc7a08cebb1..4f7fd7755a7 100644 --- a/tabbycat/participants/views.py +++ b/tabbycat/participants/views.py @@ -194,11 +194,11 @@ def use_team_code_names(self): return use_team_code_names(self.tournament, self.admin) @staticmethod - def allocations_set(obj, admin): + def allocations_set(self, obj, admin, tournament): model_related = {'Team': 'debateteam_set', 'Adjudicator': 'debateadjudicator_set'}[type(obj).__name__] try: qs = getattr(obj, model_related).filter( - debate__round__in=obj.tournament.current_rounds).select_related('debate__round') + debate__round__in=tournament.current_rounds).select_related('debate__round') if admin: qs = qs.prefetch_related(Prefetch('debate__round__roundmotion_set', queryset=RoundMotion.objects.select_related('motion'))) @@ -214,7 +214,7 @@ def get_context_data(self, **kwargs): kwargs['admin_page'] = self.admin kwargs['draw_released'] = self.tournament.current_round.draw_status == Round.STATUS_RELEASED kwargs['use_code_names'] = self.use_team_code_names() - kwargs[self.model_kwarg] = self.allocations_set(self.object, self.admin) + kwargs[self.model_kwarg] = self.allocations_set(self.object, self.admin, self.tournament) return super().get_context_data(**kwargs) diff --git a/tabbycat/privateurls/views.py b/tabbycat/privateurls/views.py index 0a3d23ddd00..f973cdd4289 100644 --- a/tabbycat/privateurls/views.py +++ b/tabbycat/privateurls/views.py @@ -213,9 +213,9 @@ def get_context_data(self, **kwargs): kwargs['checkins_used'] = False if hasattr(self.object, 'adjudicator'): - kwargs['debateadjudications'] = BaseRecordView.allocations_set(self.object.adjudicator, False) + kwargs['debateadjudications'] = BaseRecordView.allocations_set(self.object.adjudicator, False, self.tournament) else: - kwargs['debateteams'] = BaseRecordView.allocations_set(self.object.speaker.team, False) + kwargs['debateteams'] = BaseRecordView.allocations_set(self.object.speaker.team, False, self.tournament) kwargs['draw_released'] = t.current_round.draw_status == Round.STATUS_RELEASED kwargs['feedback_pref'] = t.pref('participant_feedback') == 'private-urls' From 9d62cfa9ba2af6eed00011284bb018af87553a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Beaul=C3=A9?= Date: Sun, 12 Feb 2023 02:01:00 -0400 Subject: [PATCH 14/14] Prepare hotfix for release --- .github/CHANGELOG.rst | 5 +++-- docs/conf.py | 4 ++-- tabbycat/settings/core.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/CHANGELOG.rst b/.github/CHANGELOG.rst index 9ad25af49f7..c7e42cfc9d0 100644 --- a/.github/CHANGELOG.rst +++ b/.github/CHANGELOG.rst @@ -4,7 +4,7 @@ Change Log 2.7.5 ----- -*Release date: TBD* +*Release date: 13 February 2023* - Fixed checkins not automatically updating through private URLs and API - Prevented API error when creating ballot with incorrect speakers (BACKEND-AVN) @@ -12,9 +12,10 @@ Change Log - Fixed ballot resaving through Edit Database (BACKEND-AVR) - Removed trailing commas after panels in room allocations. Thank you to Trần Trang Linh for the fix! - Corrected missing checkin identifiers showing as "null". Thanks again to Trần Trang Linh! -- Corrected a few typos - Removed Render installation instructions [until that service can be reliably used] - Fixed conflicts not showing when dragging panels +- Fixed adjudicator record pages crashing if shared between tournaments +- Corrected a few typos 2.7.4 diff --git a/docs/conf.py b/docs/conf.py index ea466ebb3dd..7d8786a4c71 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,7 +50,7 @@ # General information about the project. project = 'Tabbycat' -copyright = '2022, Philip Belesky, Chuan-Zheng Lee, Étienne Beaulé' +copyright = '2023, Philip Belesky, Chuan-Zheng Lee, Étienne Beaulé' author = 'Philip Belesky, Chuan-Zheng Lee, Étienne Beaulé' # The version info for the project you're documenting, acts as replacement for @@ -60,7 +60,7 @@ # The short X.Y version. version = '2.7' # The full version, including alpha/beta/rc tags. -release = '2.7.4' +release = '2.7.5' rst_epilog = """ .. |vrelease| replace:: v{release} diff --git a/tabbycat/settings/core.py b/tabbycat/settings/core.py index 3113f1bfffe..01f5b8dae50 100644 --- a/tabbycat/settings/core.py +++ b/tabbycat/settings/core.py @@ -22,9 +22,9 @@ # Version # ============================================================================== -TABBYCAT_VERSION = '2.7.4' +TABBYCAT_VERSION = '2.7.5' TABBYCAT_CODENAME = 'Pixie-bob' -READTHEDOCS_VERSION = 'v2.7.4' +READTHEDOCS_VERSION = 'v2.7.5' # ============================================================================== # Internationalization and Localization