[14.0][FW-PORT] helpdesk_mgmt: Allow portal user to close its tickets#466
[14.0][FW-PORT] helpdesk_mgmt: Allow portal user to close its tickets#466
Conversation
…uttons on portal Forward port of 6eb1124 with minor fixes
- `portal_user_can_close` is now set to `done` and `cancelled` stages by default - `/ticket/close` has been replaced with `/close/ticket` to be consistent with other routes
pedrobaeza
left a comment
There was a problem hiding this comment.
Something similar has been put on 15.0 in #383, so I think it's better to backport such feature to equal modern branches.
|
|
||
| class HelpdeskTicketController(http.Controller): | ||
| @http.route("/ticket/close", type="http", auth="user") | ||
| """ """ |
| ticket.stage_id = values.get("stage_id") | ||
|
|
||
| return werkzeug.utils.redirect("/my/ticket/" + str(ticket.id)) | ||
| if "ticket_id" in values: |
There was a problem hiding this comment.
Why is this needed and is it related to the change of this PR?
There was a problem hiding this comment.
What do you mean, adding the check for ticket_id ?
There was a problem hiding this comment.
Yes, why it was not needed and now it is? And if it's an unrelated patch, it shouldn't go here.
There was a problem hiding this comment.
Anyway, I think the 15.0 change should be backported instead.
| t-attf-action="/ticket/close" | ||
| style="display:inline;" | ||
| > | ||
| method="GET" |
There was a problem hiding this comment.
Incorrect extra indentation (for all the rest of the diff)
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
This PR has been split from #448
portal_user_can_close.