is there a way to find list of projects using customfield using scriptrunner / api?
Hi Deepak,
I have created a sample script which shows how you can find this information in Jira Data Center with ScriptRunner using the HAPI APIs.
The script can be seen here and uses the approach Leo mentions above to find the project keys.
Note that the script returns 1000 issues at a time, and if you need more, you can adjust this in the numberOfIssuesToReturn variable. However, we would advise you to consider how returning a large number of issues will cause the script to take a long time to run.
I hope this information helps.
Regards,
Kristian
Hi @Deepak
I have done something similar in back days through scriptrunner. though I don't have script in handy, below is the logic I applied to get No. of projects using so and so field
1. Run a jql in scriptrunner with query " fieldname_name is not empty"
2. Split keys by - and store them in array
3. apply unique function to get unique project keys
Regards,
Leo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.