Hello,
I am looking for a way to create different number of custom fields for the different issue types. For example: can I import 4 custom fields for Bugs and 10 for Tasks?
If this is not possible, can I execute the query from IssueTransformer with all of the fields and then remove some of them?
Petya
Nothing stops you from that. For the engine it all matters what's inside ExternalIssue.
So your IssueTransformer may put 4 custom fields for a bug and 10 for an improvement. As long as you know in the IssueTransformer what issue type your dealing with currently.
I'm not sure - are you just asking theoretically or is there any actual problem with this?
In my case, for each issue type in a project I have different number of custom fields. The query in the IssueTransformer is called only once, so I have to put all of the custom fields there. But then I don't want to have unused field in JIRA and I want to remove these which are not part of the particular issue type. For instance: for Task the project usually has field Efficiency while Bug doesn't use it. I tried a few things, but it didn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, you pull all of them, but then based on the configBean you decide which actually to put into ExternalIssue. At the time IssueTransformer is executed you should have everything (the configuration) in your configBean so you need to make IssueTransformer smarter.
Also you can have your IssueTransformer doing a simple query by default and then for each issue type doing subsequent selects to get the details. As you'll notice we do like that in many places.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It was very simple solution... I just override the method SetCustomFiledsValues in my IssuesTransformer. There I put a filter over the issue types and everything started working as I wanted it!
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my case, for each issue type in a project I have different number of custom fields. The query in the IssueTransformer is called only once, so I have to put all of the custom fields there. But then I don't want to have unused field in JIRA and I want to remove these which are not part of the particular issue type. I tried a few things, but it didn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.