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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Combine/Automate approval-workflow

Hello together, 

I created a schema in Insight, in which I have maintained all Jira projects with their project managers. In the future the project managers should give the permission for the IT employees to assign authorizations to their projects.  Now I have a custom-field displayed in the JIRA ServiceDesk with all Jira-Insight-Projekt-Objects. But now I dont't know the IQL to get the attribute "project manager" from the Project-Object. Is that possible?

1 answer

Hi Christoph. 

So, do you want to display the project manager in the custom field on the issue? Or where do you need to search for the project manager?

I assume you have an object type for "projects" and an attribute for "project manager".

If so and you want to search for project that are managed by a specific project manager, the IQL would be: objecttype = projects and "project manager " = "name of manager"

If you want to display the name of the project manager in the issue view, you configure that in the custom field. Make sure to have "project manager" attribute listed in the "Object attributes on Issue view" field in the insight custom field configuration.

If you want a project manager list in the Insight custom field. The Project Managers need to have their own separate object type, and the custom field needs to point to that object type. You can then have a project manager attribute in the object type Project, that references the Project Managers object type.

If none of these answer your question, it would be good to understand better what you are trying to do.

Kind regards,
Sandra 

Hi @Sandra _Mindville_

thank you for your quick reply!

I just want to use Insight as a data source. My Insight object currently looks like this:

EDIT: "Kürzel" = Project

Insight-Projekt-Objekt.PNG

Now I have set up an IT ServiceDesk that looks like this:

Service-Desk.PNG

A user should select a project here for which he would like to have authorization.

In the linked workflow to this issue, the issue should be presented first to the supervisor of the ticket-creator and then to the project manager which is linked in the insight objekt for approval:

Workflow.PNG

In the "create ticket transition" of the workflow I have to create a function that writes the user from the selected Insight-Object into a issue-field (Here is my problem):

Create-Ticket-Transition.PNG

 

I don't know what I have to set in points 3 and 4 - so that I can save the user in a ticket field and I can select the user in the workflow as the approver: 

configure approver.PNG

 

I hope that this description describes my project better.

 

Kind regards

Christoph

Hi Christoph.

Thank you for the added details. I have to say that it's a challenge understanding it in German :)

I have a description of how you can automatically set the approver based on Insight data and the reporter of the issue. I hope that helps. See below:

Set the approver based on the Reporter:

There are two solutions, depending on whether the Manager (or project manager) attribute is of the type "Jira user" or referencing an object type. If it's of the type "Jira user" this is easier, but if it's a reference attribute there are a couple of extra steps that need to be taken. 

In my examples, I have an object type called Employees.
In Scenario 1, the Employee object type has an attribute "Manager" which is of the type User (linking to Jira users).
In scenario 2. The attribute "Manager" is of the type Object and referencing the Employees object type (linking to employee objects).

Let me explain both scenarios:

First scenario:

The Manager attribute is of type "Jira user" and you have an Insight custom field for Employee. In this scenario, you need to add 2 post functions in the Create transition.

In the
 Create 
transition of the workflow add the following post-functions:

 

“
Assign Objects from an IQL query based on data from an issue.
”

-> The IQL query would be: "objecttype = Employees AND "Jira user" = ${Reporter}"

The target field would be Employee.

 

“
Set a Jira custom field with the attribute value from a selected object
”

-> Employee is the Source field, the attribute is Manager, and the target field is Approver.

 

Second scenario: 

The Manager attribute is a reference attribute to Employee: In the
Create
transition, you need to configure a few things.
 In this scenario, you need to add 3 post functions in the Create transition.


First, create an Insight custom field for Manager (or a name of your choice). Note that this doesn’t need to be on any screens.

 

In the
 Create 
transition of the workflow add the following post-functions:

“
Assign Objects from an IQL query based on data from an issue.
”


-> The IQL query would be: "objecttype = Employees AND "Jira user" = ${Reporter}"

The target field would be Employee

 

“
Set a Jira custom field with the attribute value from a selected object
”

This updates the Insight custom field Manager with the Manager object for the selected Employee.


-> Employee is the Source field, the attribute is Manager, and the target field is Manager.

 

“
Set a Jira custom field with the attribute value from a selected object
” 

This looks up the object in the Manager Insight custom field and sets the attribute “Jira user” in the Approver field.


-> Manager is the Source field, the attribute is “Jira user”, and the target field is Approver.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍂📹 Apptoberfest demo contest roundup: vote for your favorite demos!

Hi Community! The submissions are in (and listed below) for the 🍻🍂Apptoberfest🍂🍻 Demo Competition and it’s time for you to place your votes for the best: Analytics & reporting app demo ...

78 views 2 11
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you