Skip to content

Default to include Wikimedia ID in speaker export#2683

Draft
hongquan wants to merge 12 commits intofossasia:devfrom
hongquan:feature/default-to-export-wikimedia-id
Draft

Default to include Wikimedia ID in speaker export#2683
hongquan wants to merge 12 commits intofossasia:devfrom
hongquan:feature/default-to-export-wikimedia-id

Conversation

@hongquan
Copy link
Copy Markdown
Member

@hongquan hongquan commented Mar 5, 2026

From a recent discussion, the settings is difficult to find, our customer may not be aware of it. So we should let it default to True.

image Screenshot From 2026-03-06 18-17-08

Wikimedia user without email address will be asked for email address (we will turn off this feature later):

image

Speaker export (Talk) includes "wikimedia username"

image

Copilot AI review requested due to automatic review settings March 5, 2026 04:34
@github-project-automation github-project-automation Bot moved this to Backlog in Eventyay Next Mar 5, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Mar 5, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds Wikimedia username to speaker export with default enabled and performs small cleanup of string concatenations in configuration lambdas.

Class diagram for updated speaker export form and Wikimedia username setting

classDiagram
    class SpeakerExportForm {
        +BooleanField include_wikimedia_username
        +__init__(args, kwargs)
        +questions
        +export_field_names
        +get_queryset
        +_get_submission_ids_value(obj)
        +_get_submission_titles_value(obj)
        +_get_include_wikimedia_username_value(obj)
        +_prepare_object_data(obj)
    }

    class AppSettings {
        +bool include_wikimedia_username = True
        +bool type
        +BooleanField form_class
        +BooleanField serializer_class
    }

    SpeakerExportForm --> AppSettings : reads_default_for
Loading

File-Level Changes

Change Details Files
Expose Wikimedia username as an exportable field on the speaker export form, defaulting it to included.
  • Add include_wikimedia_username BooleanField to the speaker export form with label and initial=True
  • Include include_wikimedia_username in the list of export_field_names so it appears as a selectable/exported column
  • Implement _get_include_wikimedia_username_value accessor to read wikimedia_username from the speaker object
  • Ensure _prepare_object_data still sets event-specific profile before export processing
app/eventyay/orga/forms/speaker.py
Change the system-wide default for including Wikimedia username to true and simplify some concatenation lambdas in configuration.
  • Update default_setting for include_wikimedia_username from 'False' to 'True' while keeping type and form/serializer classes
  • Refactor two lambda concatenations to drop redundant str() wrapping of ternary expressions, preserving logic but cleaning up style
app/eventyay/base/configurations/default_setting.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The new export field name include_wikimedia_username is confusing since it contains a verb and the corresponding value accessor actually returns obj.wikimedia_username; consider renaming the exported column (and its getter) to something like wikimedia_username to better reflect the data being exported.
  • The form field include_wikimedia_username is hard-coded with initial=True while there is also a configuration default for include_wikimedia_username; consider wiring the form’s initial value to the configuration value so they stay in sync if the default changes in the future.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new export field name `include_wikimedia_username` is confusing since it contains a verb and the corresponding value accessor actually returns `obj.wikimedia_username`; consider renaming the exported column (and its getter) to something like `wikimedia_username` to better reflect the data being exported.
- The form field `include_wikimedia_username` is hard-coded with `initial=True` while there is also a configuration default for `include_wikimedia_username`; consider wiring the form’s initial value to the configuration value so they stay in sync if the default changes in the future.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates export/config defaults so Wikimedia usernames can be included by default, primarily targeting speaker exports.

Changes:

  • Add a new (default-enabled) checkbox to include Wikimedia username in the orga speaker CSV/JSON export.
  • Flip the global default for the include_wikimedia_username event setting to True (affecting other areas that read this setting as well).
  • Minor import consolidation / small string-expression cleanup in settings definitions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
app/eventyay/orga/forms/speaker.py Adds a new exportable column/checkbox for Wikimedia username, defaulting to selected.
app/eventyay/base/configurations/default_setting.py Changes the default value of include_wikimedia_username (and includes minor formatting/import adjustments).

Comment thread app/eventyay/orga/forms/speaker.py Outdated
},
'include_wikimedia_username': {
'default': 'False',
'default': 'True',
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the global default for the include_wikimedia_username event setting from False to True has broader effects than speaker export: it will enable Wikimedia username collection/display in checkout and include it in other exports (e.g. order list export) by default for new events. Please confirm this wider default change is intended; if the goal is only to default the speaker export column to included, this setting default should likely remain False.

Suggested change
'default': 'True',
'default': 'False',

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is intended.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hongquan

enable Wikimedia username collection/display in checkout

So, this means the ticketing checkout would always have "wikimedia" enabled? The decision if it is enabled should depend on the ticketing configuration. As far as I understand though, if we have it enabled here, it must be enabled in the ticketing config as well or how?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariobehling This PR makes it enabled at the same time for two places: Ticketing and Speaker export (Talk). These two are not linked yet.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, in that case there should be a helper text and a link to the other place, I think.

Enabling this option will also collect the Wikimedia username during ticketing, if ticketing is enabled, and include it in the checkout process. For more details, see [link to relevant section].

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still Wikimedia should not be a default field for all events. E.g. we dont want it on eventyay.com. It is preferable for wikimedia.eventyay.com though.

So, what options are there to control this? Maybe we need a config option for the platform?

In particular events on eventyay.com should not include Wikimedia as a default.

785580f9-2e3f-464f-b661-87024ff0a47e

Copilot AI review requested due to automatic review settings March 6, 2026 11:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread app/eventyay/orga/forms/speaker.py
Comment thread app/eventyay/jinja-templates/socialaccount/signup.jinja
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread app/eventyay/jinja-templates/socialaccount/signup.jinja
Copilot AI review requested due to automatic review settings March 20, 2026 06:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment on lines 78 to 82
'avatar_license',
'submission_ids',
'submission_titles',
'wikimedia_username',
]
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export_field_names always includes wikimedia_username. If you decide to hide/disable Wikimedia IDs based on event.settings.include_wikimedia_username (consistent with checkout and order export), this list should also be conditional; otherwise ExportForm.export_fields/export_data can crash due to missing self.fields['wikimedia_username'] or unexpectedly allow exporting the value when the setting is off.

Copilot uses AI. Check for mistakes.
@hongquan
Copy link
Copy Markdown
Member Author

Yes, I will research more in the codebase to see:

  • How to link that option between Ticketing and Talk.
  • Make the configuration discoverable.

@hongquan hongquan marked this pull request as draft March 20, 2026 11:31
Copilot AI review requested due to automatic review settings April 1, 2026 13:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

app/eventyay/base/configurations/default_setting.py:242

  • include_wikimedia_username is now enabled by default, but the form field only has a label. Given this setting affects checkout field visibility and exports (e.g. order list exporter checks it), please add a clear help_text explaining the broader impact and where to configure related ticketing/export behavior so organizers don’t enable it unintentionally.
    'include_wikimedia_username': {
        'default': 'True',
        'type': bool,
        'form_class': forms.BooleanField,
        'serializer_class': serializers.BooleanField,
        'form_kwargs': dict(
            label=_('Add the Wikimedia ID for users authenticated via Wikimedia'),
        ),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants