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.
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!
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG