Skip to content

Adds reservation cancellation path to resources#2550

Open
Tschuppi81 wants to merge 8 commits into
masterfrom
feature/ogc-3064-cancel-reservation
Open

Adds reservation cancellation path to resources#2550
Tschuppi81 wants to merge 8 commits into
masterfrom
feature/ogc-3064-cancel-reservation

Conversation

@Tschuppi81

@Tschuppi81 Tschuppi81 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Reservation: Adds reservation cancellation path to resources

TYPE: Feature
LINK: ogc-3064

@linear

linear Bot commented Jun 29, 2026

Copy link
Copy Markdown

OGC-3064

@Tschuppi81 Tschuppi81 force-pushed the feature/ogc-3064-cancel-reservation branch from c5c6960 to 80c2aac Compare June 29, 2026 14:19
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.59664% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.55%. Comparing base (22faac2) to head (79501c1).
⚠️ Report is 7 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/onegov/org/views/reservation.py 91.13% 7 Missing ⚠️
src/onegov/town6/views/ticket.py 75.00% 2 Missing ⚠️
src/onegov/org/models/ticket.py 92.85% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/onegov/org/forms/__init__.py 100.00% <100.00%> (ø)
src/onegov/org/forms/resource.py 80.30% <100.00%> (+0.30%) ⬆️
src/onegov/org/forms/ticket.py 97.36% <100.00%> (+0.49%) ⬆️
src/onegov/org/views/ticket.py 85.45% <ø> (ø)
src/onegov/reservation/models/resource.py 90.77% <100.00%> (+0.04%) ⬆️
src/onegov/org/models/ticket.py 89.19% <92.85%> (+0.04%) ⬆️
src/onegov/town6/views/ticket.py 79.16% <75.00%> (-0.53%) ⬇️
src/onegov/org/views/reservation.py 70.87% <91.13%> (+2.08%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 22faac2...79501c1. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Daverball Daverball left a comment

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.

Currently this seems to be limited to cancelling all reservations in a ticket, which should cover individual reservations nicely, but does that cover 90+% of customer requests or is it more common, or almost as common that for large half year reservations, they want to cancel a single date?

If so, we probably need to allow customers to select which dates they want to cancel, which would also necessarily change the UI in the ticket.

@Tschuppi81

Copy link
Copy Markdown
Contributor Author

Now cancellation requests can select single reservations to be cancelled and the manager sees the request cancellation dates, then approve it.

@Tschuppi81 Tschuppi81 requested a review from Daverball July 7, 2026 06:15

@Daverball Daverball left a comment

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.

Looks good overall, although we should consider if and how we should notify a ticket's assignee and/or resource recipients.

There's also couple of minor improvement suggestions and a couple of questionable conditions, that make the feature less flexible.

Comment thread src/onegov/org/forms/resource.py Outdated
Comment thread src/onegov/org/models/ticket.py Outdated
Comment thread src/onegov/org/views/reservation.py Outdated
Comment thread src/onegov/org/views/reservation.py
Comment thread src/onegov/org/views/reservation.py
Tschuppi81 and others added 2 commits July 7, 2026 08:31
Co-authored-by: David Salvisberg <david.salvisberg@seantis.ch>
Co-authored-by: David Salvisberg <david.salvisberg@seantis.ch>
@Tschuppi81 Tschuppi81 force-pushed the feature/ogc-3064-cancel-reservation branch from 999ca4a to 79501c1 Compare July 7, 2026 12:58

self.last_state_change = self.timestamp()
self.state = 'open'
self.user = None

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.

I think it only makes sense to unassign the ticket and reopen it, if it has already been closed. If it's pending, it should stay pending.

In either case we may want to notify resource recipients in addition to assignees, just like we do when a customer writes a message into a pending ticket. Also keep in mind that there may not be an assignee, in which case you can only send an e-mail to resource recipients. Although we may want to add a new setting on resource recipients, so they can be subscribed to this specific kind of notification, but we may want to write a migration that subscribes all recipients that currently subscribe to customer messages, to also subscribe to cancellation requests.

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.

2 participants