I have a ProForma single select dropdown that has its options (a list of people's names) loaded by an external data connection. The action is mandatory, so a single person's name is the result.
I would like to link or copy that name into a Jira single line text field.
If I try simply to link the dropdown to a Jira single line text field, ProForma tries to force the question to be single line to match, which is the opposite of what I want.
If I try to link the dropdown to a Jira dropdown field, I get a message asking which do I want: the external connection link, or the custom field?
Maybe there's a JQL solution?
I faced the same problem too and after studying documentation and long experiments there was no solution. You can use values from customfield in proforma field, or you can use proforma with external connection, but you can't link it to customfield, and it's impossible to link customfield of one type to proforma field with another type.
I solved this problem with scriptrunner and groovy script (in postfunction), which takes values from proforma and adds it to customfield.
Thank's for replying @Evgeniy. I am reluctant to introduce groovy script, but maybe I'll have to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case, if you'll decide to use script :)
/*
* Created 2023.
* @author Evgeniy Isaenkov
* @github https://github.com/Udjin79/SRUtils
*/
import com.atlassian.jira.bc.issue.properties.IssuePropertyService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.entity.property.EntityProperty
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.user.ApplicationUser
import groovy.json.JsonSlurper
Map getProformaAnswers(Issue issue, Integer formId = 1) {
ApplicationUser currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
IssuePropertyService issuePropertyService = ComponentAccessor.getComponentOfType(IssuePropertyService)
List<EntityProperty> allProperties = issuePropertyService.getProperties(currentUser, issue.id)
Map parsedJson = [:]
for (def property : allProperties) {
if ((property.key == "proforma.forms.i${formId}") && property.value.contains('\"schemaVersion\":8')) {
JsonSlurper jsonSlurper = new JsonSlurper()
parsedJson = jsonSlurper.parseText(property.value) as Map
}
}
return parsedJson.state.answers
}
Map proFormaData = getProformaAnswers(issue)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.