Import different number of custom fields for the different issue types?

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

2 answers

1 accepted

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.

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.

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!

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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

119 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you