Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Using Insight for change approvals for a unique request type


I've managed to configure an Insight Post Function to retrieve and add an Approver to a JSD ticket.  No problem there.

The challenge I have is that the Workflow is used by multiple "Request Types" and when I try to Isolate the Request Type to one particular JSD form via the Insight Post Function "Condition" (Groovy Script), it does not work.  All "Request Types" are assigned an Approver.  Not just the one stated in the "Condition".

Since the Insight "Condition" states that "Supported fields are Jira Text fields and Insight custom fields." I made sure to use the "text" CF field that we created ("Customer request type in text") for the "Customer Request Type".  We thought that the Groovy script would accomplish our specific need.  Unfortuantely not.  Below is the "Groovy" script used for the Insight Post Function "Condition"

import com.atlassian.jira.component.ComponentAccessor

def requestTypeCF = ComponentAccessor.customFieldManager.getCustomFieldObject(12581)
def customerRequestType = issue.getCustomFieldValue(requestTypeCF)
if ("si/58b854d5-eb32-297d-9a89-c43e293c19b9".equals(customerRequestType)) {
return true
return false


Any suggestion would be appreciated

Vince C

1 answer

Hi @Vincenzo Ciaravella 

The support for Insight & Text fields is specifically related to the 2 dropdown settings for the post function. In your condition, there's not difference in support.

You can simply use the ID for the actual request type field and then retrieve the value as text:

//Use the correct field ID (not the text field)
def requestTypeCF = ComponentAccessor.customFieldManager.getCustomFieldObject(12581)

Let me know how that goes.

Kind regards

Thanks for the reply Jorden,

The Insight Post Function worked fine the way I had originally configured it (works only when I used the scripted "Customer request type in text" field and not the regular custom field "Customer request type").

That unfortunately does not solve my real problem.  I wanted the Approval Buttons to appear in the customer portal and to do this I must use the "Add Approval" config that comes associated with each status.  This works if I don't discriminate which request type I use.  What I failed to realize is that this "Add Approval" and the "Insight Post Function" (which contains my condition on which request type will add an Insight "manager" to the "Approvers" custom Field) are complete mutually exclusive events.

I was hoping that they would work in concert with each other (adding the Approval Buttons based on the Insight Post Function).

All this to avoid having to set up a unique workflow (with approvals) for a specific Issue type (associated to one Customer request type).  That may be my only option.

Thanks again for your effort

Hi @Vincenzo Ciaravella 

Ah sorry I misunderstood. Approvals is indeed tricky if you want them only on some request types. In that regard, I think you're indeed restricted and have to use multiple workflows.

I believe approvals work with conditions on the transition, perhaps you can also change the condition to have either the approval or a custom condition to validate the request type again. In case the request type is different from the one you require approval for, your condition should return true so the transition button becomes available to your team without having approve/decline buttons.

However, not exactly sure if that's going to work (and if I even remember correctly how it works).

Thanks for taking the time to answer.  Much appreciated!!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events