Change position Support Group in MA form.
Is it possible to relocate Support Group field?
Before it was hard coded to the MA form we used custom code in the custom.js and was the Support Group located just below Description. We like to have this field back on that location.
Regards,
Roelof
Best Answers
-
Ryan_Lane Cireson Support Advanced IT Monkey ✭✭✭Hello!
There are a few ways to go about doing this as shown by the previous answers using custom task scripts to move the field. In my case I went to the source templates for generating the HTML to make things a bit cleaner and help with page responsiveness on load.
Activities are generated via HTML template files vs. the JSON files for Work Items (Incident.js/ServiceRequest.js) which are located in the "\Scripts\app\templates\activity" directory. Modifying the relevant template file directly or using an HTTP Redirect will allow you to rearrange and add/remove fields on load. In our business case we wanted to rearrange and simplify the Manual Activity interface in the Portal but the general steps are the same to modify just the arrangement of fields:
To achieve this without modifying Cireson files I ran through the following steps:
1. Copy the stock manual-activity.html from "\Scripts\app\templates\activity" to "CustomSpace\Scripts\app\templates\activity":
2. Modify the new custom manual-activity.html so the Support Group (ServiceTeam in OP's case) field HTML is relocated where we'd like it. In my case it was from Line 140 to Line 45 so Support Group and Assigned To fields share the same row:
3. Create an HTTP Redirect from the stock manual-activity.html to our new custom manual-activity.html:
We have implemented this in our production environment and have noted a couple pros/cons:
Pros:
- No additional scripts to run on clients to perform the rearrangement so page responsiveness isn't affected.
- No modifications of Cireson source files so Portal upgrades and modifications are easier to track and patch when needed.
Cons:
- IIS HTTP Redirects require minor maintenance on Portal upgrades to recreate either manually or via a script.
- If the source HTML template changes on a Portal upgrade then the custom HTML template file will need to be recreated to incorporate any changes.
9 -
Roelof_Luinge Customer IT Monkey ✭Ryan_Lane said:Hello!
There are a few ways to go about doing this as shown by the previous answers using custom task scripts to move the field. In my case I went to the source templates for generating the HTML to make things a bit cleaner and help with page responsiveness on load.
Activities are generated via HTML template files vs. the JSON files for Work Items (Incident.js/ServiceRequest.js) which are located in the "\Scripts\app\templates\activity" directory. Modifying the relevant template file directly or using an HTTP Redirect will allow you to rearrange and add/remove fields on load. In our business case we wanted to rearrange and simplify the Manual Activity interface in the Portal but the general steps are the same to modify just the arrangement of fields:
To achieve this without modifying Cireson files I ran through the following steps:
1. Copy the stock manual-activity.html from "\Scripts\app\templates\activity" to "CustomSpace\Scripts\app\templates\activity":
2. Modify the new custom manual-activity.html so the Support Group (ServiceTeam in OP's case) field HTML is relocated where we'd like it. In my case it was from Line 140 to Line 45 so Support Group and Assigned To fields share the same row:
3. Create an HTTP Redirect from the stock manual-activity.html to our new custom manual-activity.html:
We have implemented this in our production environment and have noted a couple pros/cons:
Pros:
- No additional scripts to run on clients to perform the rearrangement so page responsiveness isn't affected.
- No modifications of Cireson source files so Portal upgrades and modifications are easier to track and patch when needed.
Cons:
- IIS HTTP Redirects require minor maintenance on Portal upgrades to recreate either manually or via a script.
- If the source HTML template changes on a Portal upgrade then the custom HTML template file will need to be recreated to incorporate any changes.
Regards
Roelof1
Answers
Hi Jeff,
Thanks for your response.
Do I have to add this into the custom.js? Tryed this, but no results.
Regards, Roelof
There are a few ways to go about doing this as shown by the previous answers using custom task scripts to move the field. In my case I went to the source templates for generating the HTML to make things a bit cleaner and help with page responsiveness on load.
Activities are generated via HTML template files vs. the JSON files for Work Items (Incident.js/ServiceRequest.js) which are located in the "\Scripts\app\templates\activity" directory. Modifying the relevant template file directly or using an HTTP Redirect will allow you to rearrange and add/remove fields on load. In our business case we wanted to rearrange and simplify the Manual Activity interface in the Portal but the general steps are the same to modify just the arrangement of fields:
To achieve this without modifying Cireson files I ran through the following steps:
1. Copy the stock manual-activity.html from "\Scripts\app\templates\activity" to "CustomSpace\Scripts\app\templates\activity":
2. Modify the new custom manual-activity.html so the Support Group (ServiceTeam in OP's case) field HTML is relocated where we'd like it. In my case it was from Line 140 to Line 45 so Support Group and Assigned To fields share the same row:
3. Create an HTTP Redirect from the stock manual-activity.html to our new custom manual-activity.html:
We have implemented this in our production environment and have noted a couple pros/cons:
Pros:
- No additional scripts to run on clients to perform the rearrangement so page responsiveness isn't affected.
- No modifications of Cireson source files so Portal upgrades and modifications are easier to track and patch when needed.
Cons:
- IIS HTTP Redirects require minor maintenance on Portal upgrades to recreate either manually or via a script.
- If the source HTML template changes on a Portal upgrade then the custom HTML template file will need to be recreated to incorporate any changes.
Regards
Roelof
Is there a way to take this one step further?
Say I have two MA types.
One is our typical OotB MA.
The second type is used for Workstation Builds and will need 2 specialized CI pickers, both required, one for the Hardware Asset and the other Owner (AD User).
Any way to branch to a custom MA template for Workstation Build MAs?