Profields 4.4 JAVA API - get profield field Value

fjodors
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 16, 2016

Hello

 

Is there any example how I can get profield field and it's value of specific project in JAVA API

I checked documentation http://profields.javadoc.deiser.com/4.2/, however I can't understand how can I get these parameters.

My code is

import com.deiser.jira.profields.api.projectvalue.ProfieldsFieldValue;
...

ProfieldsField myField=profieldsField.getProfieldsField();

Eclipse shows me that "profieldsField cannot be resolved" and doesn't offer any method after "profieldsField."

 

Could you help me to find correct syntax for this?

 

Thank you in advance,

Fyodor

 

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 16, 2016

Hi Fjodors,

In the code snippet you posted profieldsField variable is not defined so the eclipse shows the error.

I guess that what you need to do is to retrieve instance of the ProjectValueService and call getValuesForProject:

ProjectValueService pvs = ComponentAccessor.getOSGiComponentInstanceOfType(ProjectValueService.class);

Also have a look at FieldService.

TAGS
AUG Leaders

Atlassian Community Events