Hello,
I'm trying to get a list of Project objects with a given Profield value using Profield Java API (see method
getProjectList) in example below.
For example, the list of project whose Profield called "country" is equals to "Brasil".
Has anybody implemented any feature using Java API?
I have some problems configuring my pom.xml because of some required dependecies from profields-4.3.0.jar
Thank you,
Alejandro
import com.atlassian.jira.project.Project; import com.atlassian.jira.user.ApplicationUser; import com.deiser.jira.profields.api.projectfilter.ProjectQuery; import com.deiser.jira.profields.api.projectfilter.QueryExpressionBuilderFactory; import com.deiser.jira.profields.api.projectvalue.ProfieldsFieldValue; import com.deiser.jira.profields.api.projectvalue.ProjectValueService; import com.deiser.jira.profields.search.projectquery.expression.QueryExpressionBuilder; import com.deiser.jira.profields.search.projectquery.expression.element.QueryExpressionClause; public class TestImpl { private ProjectValueService projectValueService; private QueryExpressionBuilderFactory queryExpressionBuilderFactory; public ProjectRoleAssignerImpl(ProjectValueService projectValueService, QueryExpressionBuilderFactory queryExpressionBuilderFactory) { this.projectValueService = projectValueService; this.queryExpressionBuilderFactory = queryExpressionBuilderFactory; } public void getProjectList(String pql, ApplicationUser user) { QueryExpressionBuilder queryExprBuilder = queryExpressionBuilderFactory.getBuilder(); queryExprBuilder.fromPql(user, pql); ProjectQuery projectQuery = queryExprBuilder.getQuery(user); QueryExpressionClause query = null; List<ProfieldsFieldValue> projectValues = projectValueService.getProjectsByQuery(projectQuery); for (ProfieldsFieldValue projectValue : projectValues) { Project project = projectValue.getProject(); System.out.println("ProjectRoleAssignerImpl.getProjectList():Project=" + project.getKey()); } } }
This bug was fied into version 4.3.4.
How did u resolved this please let me know
geting below error
[ERROR] Failed to execute goal on project synch-onejira-plugin: Could not resolve dependencies for project com.go2group.jira.plugin:synch-onejira-plugin:atlassian-plugin:2.0.0: Could not find artifact com.deiser:profields:jar:4.1.3 in atlassian-public (https://maven.atlassian.com/repository/public)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also get an empty collection for projectValueService.getValuesForProject(). I create a ticket on deiser issue tracker.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.