How to create a custom field that is the weighted average of 3 other fields on the issue?

This question is in reference to Atlassian Documentation: Adding a custom field

I want to create a custom field that is the weighted average of 3 other fields on the issue.  This should be dirt simple with some kind of script, but I can't find any recent documentation on how to do this.  A google search turns up the following link, but the "JIRA Misc Custom Field" plugin doesn't appear in the market place search.  

https://marketplace.atlassian.com/plugins/com.innovalog.jmcf.jira-misc-custom-fields/server/overview

What are my options?  Thanks in advance.

2 answers

1 accepted

Accepted Answer
1 vote
Steven Behnke Community Champion Jun 30, 2016

You have precious few options in the Cloud environment. Misc Custom Fields is not avaliable for Cloud.

Atlassian has recently announced an API that would allow add-ons to control fields from JIRA Cloud, so this functionality may not be available yet but it will come out.

Thanks for the quick response Steven.  Clicking around I found the "Add Post Function To Transition" screen and the "Set Field Value to constant or Groovy expression" option.  Do you think I can use Post Functions on the onCreate and onUpdate events to solve my problem?

Steven Behnke Community Champion Jun 30, 2016

The "groovy expression" portion is disabled in Cloud. You cannot run arbitrary scripts in the cloud environment unfortunately. You can use "Set field value to constant" or "Copy field to field" but these won't let you perform math.

One of the services my company provides is to supplement functionality of the Cloud environment. Let me explain how that works – 

  • We provide a service running on another webserver
  • The service consumes events (Webhooks) or runs queries (over REST) periodically
  • The service performs actions or operations based on logic we've defined

Perhaps this model would work for you, or perhaps you could hire an Expert to provide this feature for you.

image2016-6-30 11:48:47.png

 

Finally, you could also write a Connect Post-Function yourself – https://developer.atlassian.com/static/connect/docs/latest/modules/jira/workflow-post-function.html

0 votes

We do this in JIRA Server using the ScriptRunner add-on for a number of customers.

For Cloud with limited scripting it's harder. You could have a remote script run periodically to update a field in issues that have changed but it may not scale well for more than 10K issues being updated.

 

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

513 views 0 9
Read article

Atlassian User Groups

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!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you