Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Get custom field value after creation Edited

Hi Atlassian,

I want to get custom field value after issue creation. Here is my code where I'm setting value to custom field:

 void set_custom_field_value(String value, String destField, Issue issue)
{
CustomFieldManager cm = ComponentAccessor.getCustomFieldManager();
CustomField f = cm.getCustomFieldObjectByName(destField);
DefaultIssueChangeHolder ch = new DefaultIssueChangeHolder();
f.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(f),
value), ch);
}

This works and I can see value in the custom field, but I couldn't get it from Rest API. It gave me null.

This works in jira 7.x perfectly, I can get the custom field value.

Sorry for bad English :).

Regards,

Mamikon

 

1 answer

Hi @Mamikon Papikyan,

REST API endpoint for Jira Server and Jira Cloud is different. Can I know how you are getting the custom field value using REST API?

Thanks,
Moga

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,193 views 8 28
Join discussion

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