Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




EventListener API

web-app

What triggers the "IssueProgressUpdate" event in the event listener API?

I've got my listener plugin working but nothing I try seems to trigger that event (logging through debugview - I can see when IssueAssigned is triggered)

Am I right that there's no event for when a user enters a time log?

alitheg
· 1
alitheg
Replies (21)
helpful
0
not helpful

This is a legacy event that used to be triggered when the precent complete changed.

There is no time entry event, feel free to add it to our list: http://gemini.countersoft.com


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

On that note, what triggers IssueUpdated()? I can't seem to get it to fire.


alitheg
· 1
alitheg
helpful
0
not helpful

Actually, I think my plugin is broken...the IssueAssigned() event used to fire, but now it doesn't (all it does is print debug output on that one)


alitheg
· 1
alitheg
helpful
0
not helpful

Please check Gemini's error log for errors. It might be that you are missing some DLLs.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Right. Plugin now working again. I had built the dll with a different version of the dlls than Gemini was using. Still no events though.Checking the log now.


alitheg
· 1
alitheg
helpful
0
not helpful

I was getting:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.08/09/2009 10:23:14 at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at CounterSoft.Gemini.Business.Events.GeminiEventDispatcher.LoadPlugins(String strPath)mscorlib

But I think that was the dll version problem. IssueUpdated still isnt' firing though. Should it activate when I modify the type or severity of an issue? (Type requires use of the "Edit" link, severity can be changed from the "Change" link)


alitheg
· 1
alitheg
helpful
0
not helpful

It is not firing because of the error. Try putting all CounterSoft's dlls in the plugins dir as well.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

The error isn't being logged any more though. I've made my IssueAssigned event fire twice (successfully) since the error was logged last, at 10.23. In that time, though, the other is still not working.


alitheg
· 1
alitheg
helpful
0
not helpful

Aha! I'm now getting two new errors:

This appears 3 times for each time I perform an event-triggering action:

Cannot create an abstract class.08/09/2009 10:50:55 at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at CounterSoft.Gemini.Business.Events.GeminiEventDispatcher.LoadPlugins(String strPath)mscorlib

and this appears once:


Could not load file or assembly 'CounterSoft.Gemini.WebServices, Version=3.5.4.2435, Culture=neutral, PublicKeyToken=0e17ff0349390ca9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)08/09/2009 10:50:55 at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.UnitySerializationHolder.GetRealObject(StreamingContext context) at System.AppDomain.Load(String assemblyString) at CounterSoft.Gemini.Business.Events.GeminiEventDispatcher.LoadPlugins(Stmscorlib


alitheg
· 1
alitheg
helpful
0
not helpful

Copy all of CounterSoft's DLLs from the bin to the plugins folder.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

All of them? I'd assumed I only needed those my library used. Alright doing so.


alitheg
· 1
alitheg
helpful
0
not helpful

Still getting the abstract class error, the WebServices one has gone and been replaced with the original.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.08/09/2009 11:19:56 at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at CounterSoft.Gemini.Business.Events.GeminiEventDispatcher.LoadPlugins(String strPath)mscorlib Cannot create an abstract class.08/09/2009 11:19:55 at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at CounterSoft.Gemini.Business.Events.GeminiEventDispatcher.LoadPlugins(String strPath)mscorlib


alitheg
· 1
alitheg
helpful
0
not helpful

That error is expected as it is from the Gemini DLL of the abstract class.

Try and put some debugging code in your plugin to see if it instantiated etc...


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

I have put debugging code in.

The plugin is loaded correctly, since when I reassign an issue I see "Issue Assigned" in DebugView. However when I change something on an issue I see no output at all. I should receive several messages on issue update, the first simply saying "Issue updated", or an exception trace if that's what happens, since I've got a try-catch around it with a debug trace in the catch block as well.


alitheg
· 1
alitheg
helpful
0
not helpful

Please send your code to support at countersoft dot com and we will have a look.

Which version of Gemini are you running?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

3.5.4.2435

Code's on its way.


alitheg
· 1
alitheg
helpful
0
not helpful

Got it! The WebServices DLL was out of date in my Gemini plugins directory (not on my build server, strangely...)

Anyway thanks for your help!


alitheg
· 1
alitheg
helpful
0
not helpful

Actually, I have another question about this:

UserCreated is not marked "virtual" in the definition of AbstractIssueListener (using metadata view in VS2008).

This prevents me from using the override keyword to implement a listener for new users. I have used the "new" keyword instead, adding a base.UserCreated(args) as the last line, but this event is not activating.


alitheg
· 1
alitheg
helpful
0
not helpful

I have worked around this by extending AbstractIssueListener and then implementing IUserListener as well, so that I can only implement the IUserListener methods that I choose to implement.

Is this the best way to do it?


alitheg
· 1
alitheg
helpful
0
not helpful

Yes, until the next release. We will make them virtual.


Mark Wing
· 9108
Mark Wing