-
Notifications
You must be signed in to change notification settings - Fork 263
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
5.0/add create tickets template gui #375
Conversation
Added a new function to process updates to a template object so that the different template pages for global vs queue templates can share the same code.
If loading a global template for modification add Basics, Content and Advanced menu options to the page menu.
If loading a queue template for modification add Basics, Content, and Advanced menu options to the Queue Templates menu.
Add a new element for modify a create tickets template.
Add logic to display different fields based on what view we are loading.
To ensure that the new Basics, Content, and Advanced menu options appear the page needs to reload after creating a new template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few other notes from testing:
-
Change the tab type for sections to "pill" to be consistent with other places like System Configuration.
-
Add a titlebox section to the top where we can put some documentation. You can call the section "Create Ticket Templates". Take a shot at adding some basic docs. We can refine later.
-
It seems like Section Name is required. We should indicate that, show an error if it is not provided, and retain any form values so the user doesn't lose their work if they forget.
-
If you create a section, then click on Basics or Advanced, then click back, the Section Name field is not shown. This makes sense since it's already set and maybe we're not allowing it to be changed? But if you click on "Add New Section" tab, then back, Section Name is displayed, but it's blank. Maybe rather than hiding for existing sections, we populate it with the current value and allow it to be changed?
-
Maybe related, I was able to get in a state after creating a section that I couldn't see the Custom Fields inputs, so I couldn't add a custom field.
@@ -93,6 +93,16 @@ | |||
|
|||
if ( $TemplateObj->Id() ) { | |||
push @results, ProcessTemplateUpdate( TemplateObj => $TemplateObj, ARGSRef => \%ARGS ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few areas where we're doing the same thing in global and queue level. Is it possible to factor some changes into a single mason template and avoid the duplication? If it's too much of a refactor, we don't need to do it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While working on splitting Template.html into Basics.html, Content.html, and Advanced.html I got it working for page Global and Queue level templates. Could probably refactor some more to reduce duplicated code but I think it is better than it was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored it a bit more so the Basics, Content, and Advanced pages all use the same underlying element to reduce code more.
Yes, I think separate files for each page follows the same pattern for other objects in RT. |
Done.
Done.
I made several changes for these issues:
I could not replicate this. Thinking it is not an issue with the above changes. |
Done. |
There is one issue that definitely needs addressing but I wanted to discuss the best solution. When editing a template via Admin/Queues the Basics, Content, and Advanced menu options are not visible enough to the user. They need to know they are under the page menu Templates option.
The other question I had was whether we should split the Template.html into separate pages for Basics, Content, and Advanced instead of using the ContentTab/AdvancedTab url params.