Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][ADD] heldespk_mgmt: Helpdesk stages per teams #522

Conversation

carolinafernandez-tecnativa
Copy link
Contributor

@carolinafernandez-tecnativa carolinafernandez-tecnativa commented Nov 6, 2023

Include a field in the stages to define the team. If it is empty, the stage will be available to all teams. If you have a team indicated, that stage will only be visible to tickets that belong to that team.

@Tecnativa
TT45710

@pedrobaeza @victoralmau

@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch 11 times, most recently from 7b48662 to 27536af Compare November 7, 2023 14:20
@carolinafernandez-tecnativa
Copy link
Contributor Author

ping @pedrobaeza @victoralmau

@pedrobaeza pedrobaeza added this to the 15.0 milestone Nov 13, 2023
Copy link
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.

You should try to have only one method for getting the proper stages, and call it everywhere instead of being doing changes in a lot of places. Remember also to put docstrings where applicable (like _determine_stage).

Finally, the statusbar should only contain the proper stages for the team.

helpdesk_mgmt/controllers/main.py Show resolved Hide resolved
helpdesk_mgmt/controllers/myaccount.py Outdated Show resolved Hide resolved
helpdesk_mgmt/controllers/myaccount.py Outdated Show resolved Hide resolved
helpdesk_mgmt/controllers/myaccount.py Outdated Show resolved Hide resolved
@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch 2 times, most recently from 385a835 to 05c7bc6 Compare November 14, 2023 12:31
@carolinafernandez-tecnativa
Copy link
Contributor Author

You should try to have only one method for getting the proper stages, and call it everywhere instead of being doing changes in a lot of places. Remember also to put docstrings where applicable (like _determine_stage).

Finally, the statusbar should only contain the proper stages for the team.

Thanks for the review. could you please check it now?

@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch 3 times, most recently from 892eea7 to 94d875e Compare November 14, 2023 15:15
@carolinafernandez-tecnativa
Copy link
Contributor Author

ping @pedrobaeza

1 similar comment
@carolinafernandez-tecnativa
Copy link
Contributor Author

ping @pedrobaeza

helpdesk_mgmt/controllers/myaccount.py Outdated Show resolved Hide resolved
helpdesk_mgmt/controllers/myaccount.py Outdated Show resolved Hide resolved
helpdesk_mgmt/controllers/myaccount.py Outdated Show resolved Hide resolved
helpdesk_mgmt/models/helpdesk_ticket.py Outdated Show resolved Hide resolved
helpdesk_mgmt/models/helpdesk_ticket.py Outdated Show resolved Hide resolved
return self._get_applicable_stages(self.team_id)

@api.depends("team_id")
def _compute_stage_ids(self):
Copy link
Member

Choose a reason for hiding this comment

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

_compute_stage_ids (with s), but the assigned field is stage_id. Anyway, is this using the same technique as Odoo with stages in tasks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I renamed the method to _compute_stages_ids

Copy link
Member

Choose a reason for hiding this comment

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

But the proper field name should be stage_ids

@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch 2 times, most recently from 01a6d9c to 9bdc1a7 Compare December 1, 2023 00:36
@carolinafernandez-tecnativa
Copy link
Contributor Author

WIP

@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch from 9bdc1a7 to c42f581 Compare December 15, 2023 11:17
@victoralmau victoralmau force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch from c42f581 to 58469b6 Compare December 19, 2023 17:05
@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch 2 times, most recently from 281f435 to 6bd5d7b Compare January 11, 2024 15:39
@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch from 6bd5d7b to bb7b618 Compare January 12, 2024 20:35
@pedrobaeza pedrobaeza force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch 3 times, most recently from f466837 to 93b061c Compare January 16, 2024 19:08
pedrobaeza and others added 2 commits January 17, 2024 11:56
@pedrobaeza pedrobaeza force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch 2 times, most recently from 686c010 to ebb40d2 Compare January 17, 2024 11:01
Copy link
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.

Please check about the mail stuff, and it's good to go.

@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch 2 times, most recently from 495bf8a to 28317d4 Compare January 17, 2024 12:11
@carolinafernandez-tecnativa
Copy link
Contributor Author

Please check about the mail stuff, and it's good to go.

I added this fix https://github.com/OCA/helpdesk/pull/522/files#diff-8e8d21502284f8964232135dd1c317a25eacbc0e9cae741627caf414b751498eR89 in order to receive mails when ticket is created from portal

@pedrobaeza pedrobaeza force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch from 28317d4 to fc9e2d2 Compare January 17, 2024 14:59
- Remove default
- Centralize method for determining applicable stages
- Make compatible with multi-company
@pedrobaeza pedrobaeza force-pushed the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch from fc9e2d2 to a7b0736 Compare January 17, 2024 15:02
@pedrobaeza
Copy link
Member

Let's go finally with this:

/ocabot merge major

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 15.0-ocabot-merge-pr-522-by-pedrobaeza-bump-major, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d45b96d into OCA:15.0 Jan 17, 2024
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 92593bb. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 15.0-add-helpdesk_mgmt-stages-helpdesk-per-teams branch January 17, 2024 16:03
@pedrobaeza
Copy link
Member

pedrobaeza commented Jan 17, 2024

@carolinafernandez-tecnativa please fw-port it to v16/v17

@carolinafernandez-tecnativa
Copy link
Contributor Author

@pedrobaeza added on v16. #534

helpdesk_mgmt on V17 is not yet migrated.

@pedrobaeza
Copy link
Member

Write on the current opened PR to ask for its inclusion.

@carolinafernandez-tecnativa
Copy link
Contributor Author

Write on the current opened PR to ask for its inclusion.

done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants