Skip to content

[14.0][FW-PORT] helpdesk_mgmt: Allow portal user to close its tickets#466

Closed
ypapouin wants to merge 2 commits intoOCA:14.0from
decgroupe:14.0-fw-port-12.0-portal-user-close
Closed

[14.0][FW-PORT] helpdesk_mgmt: Allow portal user to close its tickets#466
ypapouin wants to merge 2 commits intoOCA:14.0from
decgroupe:14.0-fw-port-12.0-portal-user-close

Conversation

@ypapouin
Copy link
Copy Markdown
Contributor

This PR has been split from #448

  • Allow a portal user to close its ticket if the final stage is set with portal_user_can_close.

eLBati and others added 2 commits May 10, 2023 11:23
…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 pedrobaeza added this to the 14.0 milestone May 16, 2023
Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

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")
""" """
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.

Unneeded change

ticket.stage_id = values.get("stage_id")

return werkzeug.utils.redirect("/my/ticket/" + str(ticket.id))
if "ticket_id" in values:
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.

Why is this needed and is it related to the change of this PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What do you mean, adding the check for ticket_id ?

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.

Yes, why it was not needed and now it is? And if it's an unrelated patch, it shouldn't go here.

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.

Anyway, I think the 15.0 change should be backported instead.

t-attf-action="/ticket/close"
style="display:inline;"
>
method="GET"
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.

Incorrect extra indentation (for all the rest of the diff)

@github-actions
Copy link
Copy Markdown

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 17, 2023
@github-actions github-actions bot closed this Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants