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

This widget could not be displayed.
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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Statuspage

What are your best incident management tips and stories? #HugOps

 👋Community members! Downtime happens. And great incident response takes a village. Teams like Support, Dev, SRE, Ops, IT, and Marketing have to come together to resolve the problem while keep...

60 views 2 3
Join discussion

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