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

Set the Customer Request Type through Automation

When a customer submits a form the customer request type is set automatically. When I create the same form through the agent portal then the customer request type says "No Match." 

 

I've tried to fix this by setting up an Automation Rule that does this piece of JQL when the ticket is created: 

type != EMPTY AND "Customer Request Type" is EMPTY AND project = "My Project"

Then it edits the issue fields and set the customer request type to be the same as the issue type. 

 

Unfortunately it's not executing correctly and the log shows that the JQL statement passed successfully but it's failing on the edit issue: 

 

Error:

No fields or field values to edit for issues (could be due to some field values not existing in a given project):

 

Can someone spot what I'm doing wrong? 

 

Thanks!

 

2 answers

Here's how I've managed to do this.

In the project, I created a new Custom Rule:

  • WHEN -> Issue Created
  • IF -> Issue Matches -> (advanced) "Customer Request Type" is EMPTY
    • in the same IF -> Issue Matches -> (advanced) issuetype = <a specific issue type>
  • THEN -> Edit Request Type -> <set the desired Request Type>

I add a separate IF - THEN pair for each issue type in the project, and under Options set it to "Run as the user who triggered the rule"

Hi @Davide :

I am using Jira Core 8.2.3 and JIRA Service Desk 4.2.3 version.
Request Type is not a custom field.
So my question is how to handle these two field i.e. Customer Request Type and Request Type.

Kindly suggest.

Thanks,

Kalyan

 

 

@Davide: Fixed the issue on my end.

How? We have Jira Core 8.5.3 and  JIRA Service Desk 4.5.3

@Davide 

 

I am using Cloud Instance, i tried to using the if else automation but it throws erroCRT pic 2.PNG

Like Miriam Hopton likes this
Hubert Kut Community Leader May 12, 2021

@rreddy Jira Service Management Cloud.

Here is how I managed to change request type in Issue Transition. You can trigger loop transition from automation to change request type


First you need to get a special request type value from db before you use postfunction. To do that:

1) Create a request in JSM with value of request type that you want to CHANGE INTO.
2)Create a postfunction on any transition (I used loop) to copy value from Request type into i.e Description
3) Use newly created transition and you should get sth like that in description
abc/d1sad1sd1-rt22-4123-ber2-3123a3wgy1
It's a value of request type from db
4) Now go back to your workflow. Remove postunction created in point 2 and add postfunction "update custom field" -> select "request type" -> paste value from point 3-> abc/d1sad1sd1-rt22-4123-ber2-3123a3wgy1 
That's it. Request type should change to one that you want during transition.

Cheers
Hubert

1. Firstly - if You create a form through the portal - it should also assign CRT to the issue. However - if You create issue through JIRA backend - it won't (at least automatically).

If there are any issues with assigning CRT to issue for specific user - I would start with checking Permissions (that You are on Customers list, and have Customer - Portal Access permissions allowed)

2. CRT is quite specific Field Type... However in this case I assume it might be pretty simple:

a) in Portal settings make sure that Your CRTs matching JIRA Issue Types naming (I refer to your statement that you want CRTs to be matching Issue Types).

b) make sure that CRT you want to assign is matching Issue Type setup in Portal configuration

There is 1:1 mapping of CRTs into Issue Type - so in case You want automation to run - You need to ensure You follow the same mapping as it is set in the portal. If You miss anything - then You can add (duplicate) CRTs for other issue types, and not show them on the portal (do not add them to any groups)

Then it should work fine


So I worked through your list thanks! Unfortunately none of that has helped, so I think I'm missing something! 

1. Checked permissions - I'm a global admin and I've even checked the permission helper to ensure that I do have full access to the project. 

 

2a. I'e checked that the naming is exact, going so far as to copy and paste one into the other just in case there was a random space or something like that! No luck. 

 

2b. I've gone to the issue types screen on the project and checked that it's there. I've also gone into the issue scheme and checked that the issue scheme does have the issue type associated with it. 

 

I must be missing something sorry!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Next level incident management in Jira Service Management

Hello Atlassian Community! We’re thrilled to announce some exciting changes to incident management in Jira Service Management Cloud, in order to give your teams extra muscle during incidents, and ...

1,491 views 20 12
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