Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Determine Greenhopper Version?

Shelli
Contributor
April 30, 2012

I have JIRA v4.4.4#664-r167664 installed with Greenhopper. I can't find anywhere which version of Greenhopper I'm using. It doesn't seem to be listed on the Greenhopper Plugin page nor is it part of my license details. Since I'm using JIRA 4.4, am I also using Greenhopper 4.4?

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
A A Ron Geister _Trundl_
Community Champion
January 13, 2023

@Guido Eckenwalder Welcome to the community and I hope my suggestion answer your questions. 

There are two ways to do this but it will be also dependent  if your using Cloud or Data Center editions.

First would be with Automation for Jira using a smart value calculation or math expression. It will be dependent on if this is happening in 1 project or many to know if you should use global automation or project automation > Here is a link to the smart value math expression https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/ 
For Automation for Jira you would use a If field value change trigger and add condition to and edit field value with the output to the field value with the smartvalue math expression imbedded to that field you would want he outcome to be in. 

Second way would be to use scriptrunner add-on to do this for you. There is a script in the the scriptrunner cloud console in browse> Calculated Customer Field 

here is the groovy script

// get custom fields
def customFields = get("/rest/api/2/field")
.asObject(List)
.body
.findAll { (it as Map).custom } as List<Map>

def input1CfId = customFields.find { it.name == 'Custom Field 1' }?.id
def input2CfId = customFields.find { it.name == 'Custom Field 2' }?.id
def outputCfId = customFields.find { it.name == 'Output Custom Field' }?.id
def projectKey = "TP"

if (issue == null || ((Map)issue.fields.project).key != projectKey) {
logger.info("Wrong Project ${issue.fields.project.key}")
return
}

def input1 = issue.fields[input1CfId] as Integer
def input2 = issue.fields[input2CfId] as Integer

if (input1 == null || input2 == null) {
logger.info("Calculation using ${input1} and ${input2} was not possible")
return
}

def output = input1 + input2

if (output == (issue.fields[outputCfId] as Integer)) {
logger.info("already been updated")
return
}

put("/rest/api/2/issue/${issue.key}")
.header("Content-Type", "application/json")
.body([
fields:[
(outputCfId): output
]
])
.asString()



I hope this helps you with your issue. Please let me know if this answers your question.

TAGS
AUG Leaders

Atlassian Community Events