Skip to content

feat(change-status): #CO-1753 change ticket status from new to open when admin#28

Merged
Ozen40 merged 7 commits into
devfrom
CO-1753
Apr 18, 2023
Merged

feat(change-status): #CO-1753 change ticket status from new to open when admin#28
Ozen40 merged 7 commits into
devfrom
CO-1753

Conversation

@Ozen40

@Ozen40 Ozen40 commented Apr 13, 2023

Copy link
Copy Markdown
Contributor

Describe your changes

If you are a local admin, when you open ticket that has the status "new" it will automatically change the status to "open"

Checklist tests

  • As a local admin, open a ticket with the status "new" and check if the status passed to "open"
  • As a user, open a ticket with the status "new" and check if the status is still "new"

Issue ticket number and link

CO-1753

Checklist before requesting a review (magic string, indentation, comment/documentation...)

  • I have detailed the tests to do in my feature/fix in order to prevent consequents regressions (must specify in Checklist tests)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (API Doc etc...) - (must specify in Description for target version)
  • If it is a consequent feature, I have added thorough tests.
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been added to this project (must specify in Description)

Comment thread src/main/resources/public/ts/models/Ticket.ts Outdated
Comment thread src/main/resources/public/ts/controllers/controller.ts Outdated
Comment thread src/main/resources/public/ts/controllers/controller.ts Outdated
Comment thread src/main/resources/public/ts/models/ticket.model.ts Outdated
Comment thread src/main/resources/public/ts/services/ticket.service.ts Outdated
Comment thread src/main/resources/public/ts/controllers/controller.ts Outdated
Comment thread src/main/resources/public/ts/controllers/controller.ts Outdated
Comment thread src/main/resources/public/ts/models/ticket.model.ts
Comment thread src/main/resources/public/ts/models/ticket.model.ts Outdated
$scope.openTicket = function(id) {
if(!$scope.ticket || ($scope.ticket && $scope.ticket.id !== id))
$scope.ticket = _.find(model.tickets.all, function(ticket){
$scope.openTicket = async function (id) {

@alicedraillard alicedraillard Apr 17, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tu peux faire une fonction en ternaire + avec le typage du paramètre:
$scope.openTicket = async (id: string): void => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ça c'est une fonction fléché, pas une fonction ternaire

window.location.hash = '/ticket/' + ticketId;
};

$scope.changeStatusAfterOpenTicket = async function () {

@alicedraillard alicedraillard Apr 17, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

idem tu peux faire une fonction en ternaire:
$scope.changeStatusAfterOpenTicket = async (): void => {

@qpic-cgi qpic-cgi Apr 17, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fonction fléché* (manque le typage aussi)

@Ozen40 Ozen40 merged commit f6a90d9 into dev Apr 18, 2023
@Ozen40 Ozen40 deleted the CO-1753 branch April 18, 2023 07:03
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.

5 participants