Skip to content

Commit

Permalink
fix(plugins/core): Add a fallback for old schedules
Browse files Browse the repository at this point in the history
This allows new planning to coexist with plans used in old ArgusSchedule
implementation.
  • Loading branch information
k0machi committed Nov 7, 2024
1 parent cb7c771 commit eb3097c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion argus/backend/plugins/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def get_assignment(self, version: str | None = None) -> UUID | None:
if associated_test.id in plan.tests:
return plan.assignee_mapping.get(associated_test.id, plan.owner)

return None
# FIXME: Legacy fallback until we fully migrate to new plans
return self._legacy_get_scheduled_assignee(associated_test=associated_test, associated_release=associated_release)


def get_scheduled_assignee(self) -> UUID:
Expand Down
15 changes: 9 additions & 6 deletions templates/releases.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@ Releases
<div class="release-stats mb-1"></div>
</div>
</div>
<div class="col-4">
<div class="d-flex align-items-center h-100">
<div class="col-4 p-2">
<div class="d-flex justify-content-center flex-column">
<div class="btn-group">
<a href="{{ url_for('main.release_dashboard', release_name=release.name) }}" class="btn btn-primary"><i class="fas fa-tachometer-alt"></i> Dashboard</a>
<a href="{{ url_for('main.release_dashboard', release_name=release.name) }}" class="btn btn-outline-success"><i class="fas fa-tachometer-alt"></i> Dashboard</a>
{% if release.perpetual %}
<a href="{{ url_for('main.duty_planner', name=release.name) }}" class="btn btn-primary"><i class="fas fa-calendar-alt"></i> Duty Planning</a>
<a href="{{ url_for('main.duty_planner', name=release.name) }}" class="btn btn-outline-success"><i class="fas fa-calendar-alt"></i> Duty Planning</a>
{% else %}
<a href="{{ url_for('main.release_planner', name=release.name) }}" class="btn btn-primary"><i class="fas fa-calendar-alt"></i> Duty Planning</a>
<a href="{{ url_for('main.release_planner', name=release.name) }}" class="btn btn-outline-success"><i class="fas fa-calendar-alt"></i> Release Planner</a>
{% endif %}
</div>
{% if not release.perpetual %}
<a class="link-secondary" href="{{ url_for('main.release_scheduler', name=release.name) }}">Legacy Scheduler</a>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}

0 comments on commit eb3097c

Please sign in to comment.