I want to have a simple custom field which is like a flag true | flase. It should calculate its value based on value of other custom fields.
I am able to do this using following code :
Object soSignoff = arg1.getCustomFieldValue(customFieldManager.getCustomFieldObject("customfield_10226")); Object pdSignoff = arg1.getCustomFieldValue(customFieldManager.getCustomFieldObject("customfield_10224")); return (soSignoff != null && pdSignoff!=null)? "Approved" : "Not Approved";
But one problem with above code is hardcoded ids of custom fields. I want it to be more generic so that in different projects/contexts I should be able to provide set of custom fields based on which it should calculate the value.
Note : I haven't tested above code yet.
As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot