Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to find all the projects using default field configuration? Edited


How to find all the projects using default field configuration's of a custom field?

Any sort of help is appreciated. 




import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.fields.ConfigurableField;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.config.FieldConfigScheme;
import com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManager;
import com.atlassian.jira.issue.fields.FieldManager;
import com.atlassian.jira.issue.context.ProjectContext;
import com.atlassian.jira.issue.context.JiraContextNode;
import org.apache.log4j.Logger;
import org.apache.log4j.Level;
def log = Logger.getLogger("test.connector")

CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
FieldConfigSchemeManager fieldConfigSchemeManager = ComponentAccessor.getFieldConfigSchemeManager();
FieldManager fieldManager = ComponentAccessor.getFieldManager();

def customfield = fieldManager.getCustomField("customfield_26238")
def projects_using = customfield.getConfigurationSchemes()
def projects = customfield.getAssociatedProjectObjects()
for(int i=0;i<projects_using.size();i++){
log.debug(projects_using[i]. getAssociatedProjectIds())


The above is working only for the projects which have their separate context. 


2018-06-04 20:04:32,038 DEBUG [test.connector]: [com.atlassian.jira.issue.fields.config.FieldConfigSchemeImpl@5174eeeb, com.atlassian.jira.issue.fields.config.FieldConfigSchemeImpl@25f2efc1, com.atlassian.jira.issue.fields.config.FieldConfigSchemeImpl@2d65b11c]

2018-06-04 20:04:32,038 DEBUG [test.connector]: Default Configuration Scheme for 911 Flow Completed?

2018-06-04 20:04:32,038 DEBUG [test.connector]: []

2018-06-04 20:04:32,038 DEBUG [test.connector]: Phone Launches

2018-06-04 20:04:32,038 DEBUG [test.connector]: [21209, 22015]

2018-06-04 20:04:32,038 DEBUG [test.connector]: Kiran Test

2018-06-04 20:04:32,038 DEBUG [test.connector]: [11204]


0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

84 views 0 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you