Modifying MultiEditFieldGroup to remove Impact and Urgency
Can somebody point me in the right direction or even send me the .js custom code to remove the Impact and Urgency from the MultiEditFieldGroup. (Active work > Edit)
I "normally" remove some code from the script directory but I want to do it the correct way and place it in the CustumSpace folder.
I found this post https://community.cireson.com/discussion/comment/4262#Comment_4262 but that doesn't work for me.
Many thanks,
Wouter
Best Answer
-
Konstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭The problem is timing. The code in
custom.js
is loaded early, so the whole view / html of the page may not have loaded yet, and the element will not be found. One way to do it would be to wrap the selector and hide() call in a function, and then call that function with asetTimeout()
function. You could also try to play around with some of the events that Cireson uses, and see if one of them match the timing. I know there's adrawerCreated
event, which you could subscribe to, but I haven't tested whether that would work in this case. A third way would be to use a mutationobserver to actually detect when the Tasks drawer is opened, and then use that event to hide the fields.
Edit: Okay I checked, and the elements aren't even generated before the Tasks button is pressed, so a mutation observer would be the (only) way to go here.
5
Answers
custom.js
is loaded early, so the whole view / html of the page may not have loaded yet, and the element will not be found. One way to do it would be to wrap the selector and hide() call in a function, and then call that function with asetTimeout()
function. You could also try to play around with some of the events that Cireson uses, and see if one of them match the timing. I know there's adrawerCreated
event, which you could subscribe to, but I haven't tested whether that would work in this case. A third way would be to use a mutationobserver to actually detect when the Tasks drawer is opened, and then use that event to hide the fields.Edit: Okay I checked, and the elements aren't even generated before the Tasks button is pressed, so a mutation observer would be the (only) way to go here.