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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,755 views 11 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot