Combine/Automate approval-workflow

christoph.wege@fricke.de June 4, 2020

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

0 votes
Sandra _Mindville_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2020

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 

christoph.wege@fricke.de June 5, 2020

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

Sandra _Mindville_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2020

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
AUG Leaders

Atlassian Community Events