Hi ,
i there any sql query which will give custom field and associated to the projects.Like this i need for all projects what custom fileds are associated to it.
yes, there is ...
select * from configurationcontext; +-------+-----------------+---------+-------------------+-------------------+ | ID | PROJECTCATEGORY | PROJECT | customfield | FIELDCONFIGSCHEME | +-------+-----------------+---------+-------------------+-------------------+ | 10000 | NULL | NULL | customfield_10010 | 10000 | | 10001 | NULL | NULL | customfield_10006 | 10001 | | 10015 | 10001 | 10060 | customfield_10041 | 10013 | | 10017 | 10001 | 10060 | customfield_10006 | 10014 |
have fun
and if you don't like IDs:
select project.pname Projectname, customfield.cfname, customfield.id from customfield, configurationcontext, project where concat('customfield_', customfield.id) =configurationcontext.customfield and configurationcontext.project = project.id;
Hi Udo,
If i run the query by using * i am not getting all customfields used by a particular project.By the query which you have shared i can get only some fields since we want to clean up some custom fields which are not used i.e from in active projects (i.e last 6 months)
So if I get it correct those customfields are not related to a project. Then I gues in table configurationcontext project is null.
then this should give you the desired result:
select customfield.cfname, customfield.id from customfield, configurationcontext where concat('customfield_', customfield.id) =configurationcontext.customfield and configurationcontext.project is null;
It looks like you're new here. Sign in or register to get started.