Sql to find custom fileds Edited

Hello to all.

How can i find witch sql custom fields assigned to project when only specific issue type selected ?

For example. For any new issues of PRJ1 no custom fields required.

For any new issues of PRJ2 if Task type defined then Filed1 custom filed required otherwise none.

 

 

 

2 answers

This widget could not be displayed.

That is not a simple question.  Your SQL will need to read the field contexts, screen schemes and field configurations to work out what might be available on create (and, obviously, the screens could be different for edit.  Oh, and the workflow, you'll need to check workflow screens)

Then for the "fields required" bit, you will have already read the field configuration, but you'll need to check the workflow for any "field is mandatory" conditions or validators.

Are you sure you want to do this with SQL?  As it's the worst possible approach...

Any suggestions other than SQL ?

Im open minded. :)

Here is my case.

I build an outlook plugin which creates via SDK issues on Jira. 

So far so good.

But for some projects when opening new issue type example BUG a custom field named "Effect" required.

So if user selects this project and this type than i need to ask this extra field value.

 

So i need to know when and what  field required

Thank you in advance for your time  

Use REST - you'll need to be doing that to create the issues anyway (unless you're emailing the issues to JIRA and using your own mail handler to parse the fields)

See https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-discovering-meta-data-for-creating-issues - it shows you how to get a full list of fields and their "required" flag from the project and issue type.

It is a couple of calls, but that's a lot easier to do than building sweeping SQL statements!

This widget could not be displayed.

Ok thank you very much. I will try and hopefully will work 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

573 views 25 15
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