Questions on a Custom Issue Tracker Plugin

Hi,

We have a proprietary issue tracker system and I  am creating a teamcity plugin for the same. I was able to hook up the  plugin into teamcity but have the following questions:

1.  Our issue tracker requires more parameters. I added them to the  editIssueProvider.jsp and was able to iterate through the myProperties'  keys in IssueProvider.java. I dont think the values are available when  the IssueProviderclass is initialized as requesting for values in the  constructor of IssueProvider yielded nothing. The idea is to access the  values available from the editIssueProvider.jsp in IssueFetcher.java.  Whats the best way to go about it?

2. I am able to view  the issue description and its status just fine everywhere in TeamCity  except the issue log tab. It used to populate just fine but it doesnt do  so now. The logs tell me that all issues were retrieved successfully.  Find below a screen shot as to how i see it rite now:



overview.jpg

issuelog.jpg



I am not sure whats gone wrong and how to clean up. Any thoughts on the same is much appreciated.


Thanks,
Balaji

4 comments
Comment actions Permalink

I was able to get the second problem fixed by reinstalling teamcity. My only question now is, how do i access IssueProvider.myProperties / IssueProvider.getProperties from IssueFetcher.java.

Thanks,
Balaji

0
Comment actions Permalink

Hi Balaji,

Each issue provider is created on server startup as the following:
- first the factory is initialized (if necessary)
- method "createProvider" is called to instantiate a provider (initially empty)
- the properties are read from the config and validated using a properties processor
- after that the properties are set to the provider (using "setProperties" method)

The whole process occurs when all plugins are loaded, so it may take some time.
Hope this clarified the design a little bit.

Could you please describe where exactly you are having problems?
BTW do you plan to open source the plugin?


---
Maxim

0
Comment actions Permalink

Thanks for the reply.

I would like a few values from the editIssueProvider.jsp to be available in my getFromCacheOrFetch=>FetchFunction. I am not sure as to how to access it. Is there a sample code that contains settings other than the defaults (serverurl, username, password) that is accessed from the IssueFetcher class?

BTW, the issue tracker is an in-house/internal product and hence I am not sure how much of help it would be to open source it.

Thanks,
Balaji

0
Comment actions Permalink

Hi Balaji,

Sorry for delay in replying.
Thanks, I think I got your situation. The first idea that comes to my mind:
- extend the AbstractIssueFetcher with your fetcher class, create a setter for a desired property there;
- in your provider instantiate and pass the fetcher instance without any value;
- override "setProperties" method and call the setter of a fetcher.

If that doesn't work, please reply back with the details.


---
Maxim

0

Please sign in to leave a comment.