Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.
DISCLAIMER
All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.
Cireson does not and will not support or maintain these enhancements, extensions, and scripts.
For Team Cireson uploads click here.
Comments
Hi Guys,
I find the badges don't load on first page load. You always need to refresh once. Is anyone else seeing this in their environments?
Having said that, there is something here that might need to be looked at, though.
Thanks Tom. Perhaps it is more of a timing issue then..
I also think timing is the first place to start looking.
ok so I fixed out environment by adding a 1 second delay to the "createBadges" function. Had intended to tune that time down lower but it is not noticable at all.
So the line now reads..
setTimeout(createBadges, 1000); // This will run on page load
We get this too, however setting the timeout didn't work. I've only noticed it on initial load.
Maybe increase the timeout a bit? perhaps change the 1000 to 5000 (5 seconds) to see if it fixes it, then tune it back.
I am sure there is a more elegant fix for this as well that some of the more skilled guys up above could sort out. This was just a "quick fix" in our case for now.
I get this too and it's because that the timeout isn't sufficient on our environment with current queues/loads. This was my first custom upload and I'm starting to get a hang on this frontend stuff now (read javascript) so it's easily fixable with a mutation observer, not dependent on timeouts that could vary.
Attached an updated version with following fixes:
- Using a mutation observer instead of timeout so the badges should be visible on first page load.
- Removed the small red line when there's zero items.
- Added badges for 'Team Requests' & 'Watch List'.
- Added options so you can choose which menu items that should have a badge.
- Encapsulated all code in a anonymous function to make sure that there isn't a naming conflict in global javascript space.
To install just drop the files in CustomSpace (merge custom.js if you have other stuff there already!)
Awesome stuff Martin. Thanks for taking the time to update this and for sharing
This is really cool! I have two queues restricting incidents by work groups. Basically, if an incident is assigned to a specific support group we put it in one queue and put all other incidents in the other queue. The badges don't seem to take the queue into consideration.
Could be due to the fact that the api calls made for each of the badges isn't scoped.
Try changing this code:
to this:
wherever present in the custom js file and please report back!
That did the trick. I'm seeing the counts as expected within the scope of the assigned queues. Thank you!
Novice question: any idea where I should call/include the alertify.js script to make it usable in custom.js ? All the alertify examples seem to include the script from within html as illustrated below
<!-- include alertify script --> <script src="{PATH}/alertify.js"></script>
Thanks for your input !
I have included the badges in out TEST environment with very positive feedback.
Would it also be possible to have a badge for work items in a team queue with a count of those items where the Assigned User is null. Is it possible to parse the response to the GetGridWorkItemsMyGroups to do this.
The reason it was asked is that we are moving away from telephone support to email/self service and this would give logged on Analysts a view of items waiting in the queue for assignment, much the same way as our old telephone monitoring screen would do with calls awaiting answer.
I have not used any of these but I like the approach that @Adrian_Paech shows, so I am trying to to benefit from everyone's knowledge before proceeding.
Also, I agree with @Jonathan_Boles that it would be nice to see some of the solution above, since there are some very interesting features to it (e.g., the unlink child link).
There are some optimizations that can be done to minimize the load somewhat.
- Make sure that api calls are scoped if needed.
- Disable the api calls which are not needed.
- Don't use the 'Active Work' badge since this will generate a lot of objects.
- Disable this for end users or at least some of the api calls.
- Perhaps create a TP with no relations and change the api endpoint to GetProjectionByCritera which wont include relations in the WI objects and thus make the load a lot smaller.
And last but not least vote for a Cireson supported solution instead!
Hi Martin,
First of all thanks for this great add-on!!
Just installed v0.2 version (I had the initial load problem with v0.1) but now I have the problem that only the badge is displayed at the Active work tab all other tabs I see the badges fade-out (or something), any clue on how to fix this?
Thanks
Wouter
Shame on me........ I was working in my test environment and that doesn't have that much tickets.. Zero isn't showing (as it should be).
Thanks again for the great add-on!
Perhaps it is simply how we've deployed it, but I don't believe our architect made any changes to the code, fundamental or otherwise. Thoughts?
(For those wondering, I will start uploading my custom stuff to GitHub instead to make sure that the linked version is always the latest )
Is there a way to only show the number on the badge of WIs that is unassigned?
Our analysts will be much more productive if they can only see if there are unassigned WIs in their Team Work and Assigned To Me View
@Martin_Blomgren Updated your version and added Gerhard's suggestion
So here is an updated version, to me only Team work needs the unassigned feature thinking it thru that is the only place it really matters. My requests and Team requests to me I don't really want my users to know there requests haven't been assigned or not. My work need I say more.
And in my code you will see active work is disabled. Don't know about anyone else but I have consistently thousands of items in the live database and having that badge on was taking large amounts of memory just to display a huge number that no one really looked at anyway. If you do use active work just copy the code from the team work and you can have it on active work as well.
Enjoy
(Thanks to my team coworker Eric (not in the forum for updating the JS)
Thanks
G
Cool addon with the unassigned badge
Adrian_Paech Thank you so much for this feature!
Please tell what i can include the popup window of new request or comments feature in your custom_WorkItemMenuBadge?