Skip to content

Conversation

@riniangreani
Copy link
Contributor

@riniangreani riniangreani commented Jul 2, 2025

Added new menu in Runs:
Screenshot 2025-07-02 at 12 35 43 pm

Results and errors after run:
Screenshot 2025-07-02 at 11 20 00 am

@riniangreani riniangreani requested a review from axshen July 2, 2025 04:39
@riniangreani riniangreani changed the base branch from main to wallaby July 2, 2025 04:40
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we don't replace get_survey_component_by_name with just SurveyComponent.objects.get(name=in_name)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because I didn't know you can do that. I'll update this too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually using filter avoids getting a "DoesNotExist" exception and it will change the way I handle displaying error messages

def _auto_assign_to_component(self, request, queryset):
try:
self.auto_assign_run_to_component(request, queryset)
return redirect('/admin/survey/run/')
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we redirecting to the run page? The user starts at the survey component run page, and then this would take the user to a different page right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep thanks, I have removed the redirect.

@riniangreani riniangreani reopened this Jul 9, 2025
@riniangreani riniangreani merged commit 0e6a27a into wallaby Jul 9, 2025
1 check passed
@riniangreani riniangreani deleted the WAL-170-automatically-add-wallaby-runs-to-the-relevant-survey-components-based-on-name branch July 9, 2025 03:17
axshen added a commit that referenced this pull request Nov 3, 2025
…nts-based-on-name (#27)

* Update README.md

* Update README.md

* Add function to auto assign survey runs to components

* Add description for auto-assign action

* Make sure user messages work for auto-assign

* Update lint.yml

* Linting fixes

* Update README.md with wallaby version

* Linting fixes

* Austin feedback

* Fix wrong name pattern for quality check

---------

Co-authored-by: Austin Shen <austin.shen@csiro.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants