mattermost-community / mattermost-app-servicenow

Service Now app for Mattermost
Apache License 2.0
4 stars 5 forks source link

[MM-35188] Make short description required for "Create Ticket" form #27

Closed mickmister closed 2 years ago

mickmister commented 3 years ago

Summary

This PR makes the Short Description field required for the Create Ticket form. It is required for the "Create Ticket" modal and the command.

Ticket Link

Fixes https://mattermost.atlassian.net/browse/MM-35188

mickmister commented 3 years ago

@DHaussermann If the UX for the command is not ideal (you now have to provide the summary before submitting the command that opens the modal) then we will need to adjust the code to have the command and modal have two different forms so the command does not have the field as required.

@larkox I tried to do this when I implemented this PR but it either resulted in messy code or I was concerned about breaking things. Do you know how that may be accomplished gracefully with the project's structure?

larkox commented 3 years ago

If I am not mistaken, where the form is created for the command is on routers/mattermost/fCreateTicket.go/fCreateTicketForm, and the only way to reach that part of the code is by fetching the form from the command. There we can add a for loop setting all the required fields to not required, and let the command just open the modal.

DHaussermann commented 2 years ago

/update-branch

DHaussermann commented 2 years ago

@mickmister is this still needed? If so, can you pull master up into this branch?

Currently - I'm not able to get this to serve me a manifest. I think the make file is old and I can't remember where it served the .json I've adjusted parameters in my local version but no luck.

hanzei commented 2 years ago

@DHaussermann The PR is now up to date.

hanzei commented 2 years ago

@DHaussermann Would you mind merging the PR as it is as it contains a simple one line change?

DHaussermann commented 2 years ago

note I'm not able to adjust labels in this repo.