Set Request Type in Customer Portal
Hi Fidel,
I would like to use a post function to set the Request Type in the customer portal of my project. If this is possible, how would I go about doing this?
The use case here is I have a CSV that I'm going to import to create new issues within this project, when the issue is created I would like it to have a Request Type assigned as if it was created in the customer portal.
In this use case I would like the request type to be set to "Request Time Off".
Attached is a screenshot of current post functions in the Create transition.
Thanks,
Weston
Comments (7)
-
repo owner -
reporter Hi Fidel,
Thanks for responding! I tried the steps you recommended, but it doesn't seem to work. I've attached a screenshot of the post function for your review. Could it be in the wrong order?
I should also mention that I didn't see "Request Type" as an available field when setting the post function, however I did see "Customer Request Type" as an available option. Could this be the issue?
Thanks,
Weston
-
reporter Sorry! I forgot to attach the post function.
-
reporter Fidel, I created a test ticket from the customer portal and I received this error.
I removed the post function that was added and the issue went away. When I recreated the post function the issue returned.
Thanks,
Weston
-
repo owner Hi @WestonR,
Yes, you should use "Customer Request Type".
The problem is that you are using the request type's name as value for setting the field, but you should use the request type's key instead.
Unfortunately, there isn't a direct method to find out the key. In order to obtain the key of a particular request type you should use "Copy a parsed text to a field" post-function for writing the value of field Customer Request type in an issue whose request type is the one whose key we want to obtain.
You can use New comment as target field, and you will obtain the key of the desired request type in an automatic comment created in the issue.
-
reporter Hi Fidel,
I tried this out and it worked! I was originally using a post function to copy a value to a hidden field, then used an automation rule to set the request type based on that field value. This works much better though!
I'll mark this issue as resolved. As always, thanks for your help!
Thanks,
Weston
-
reporter - changed status to resolved
- Log in to comment
Hi @WestonR,
You can use "Copy a parsed text to a field" post-function for setting "Request type" with the following configuration:
The key of a particular request type can be obtained using "Copy a parsed text to a field" post-function for writing the value of field Request type in an issue whose request type is the one whose key we want to obtain. We can use New comment as target field, and we will obtain the key of the desired request type in an automatic comment created in the issue.
Please, let me know if you have any doubt.