How do I get a customfield to fill in the approver for me?
Asked by Vincent Luckmann:

Hello everyone,

I have the following problem :

When a User creates a Ticket about onboarding. This Ticket will transition to manager approval but will choose the manager of the reporter of that ticket as the approver.

Instead I want the reporter to choose the approver. So basically the user creates the ticket and enters the manager that will need to approve this ticket.

I have done a ton of work on my own but just can't seem to get it working.

Here are the error messages I receive when trying to transition from open to manager approval :

"Internal Server Error"

and when I use F12 to further look into this issue :

"POST \[link\] 400 (Bad Request)"

I have also configured the Post Functions between open and manager approval in the workflow accordingly :

The value **cf\[10140\]** will be appended to field **Approvers** , or set if it is a multi field.

Validators :

If a value for field **Manager 2.0** is not provided during the transition, show the following error: **Please select the approving manager!** .

Conditions :

The field **Manager 2.0** will have to be **not equal to** value '**NULL** '. Compared as **String** .

I would be more than thankful for any Tip or Trick that you will provide me.

Thank you


Answers:
author: Vincent Luckmann
body: I managed to fix this issue using a rule instead of post functions.


author: Nicolas Grossi
body: [@Vincent Luckmann](/t5/user/viewprofilepage/user-id/5510230) Everything appears to be correct. You might want to open a ticket on support.atlassian.com

Nicolas


author: Nicolas Grossi
body: [@Vincent Luckmann](/t5/user/viewprofilepage/user-id/5510230) As per your description, there are some issues there:

400 http status is not an internal server error, first issue there.

could you please check all the validators, post functions, etc to be updated with your change.

could you also paste al the values that you are using for that rule to be accurate.

Nicolas

comments: author: Vincent Luckmann
body: Hi Nicolas,

first of all thank you for the fast response.

Open -\> Manager Approval

Post functions :

1. Move up Move down Edit DeleteSet issue status to the linked status of the destination workflow step.
2. Move up Move down Edit DeleteAdd a comment to an issue if one is entered during a transition.
3. [Move up](https://seachefs.atlassian.net/secure/admin/workflows/MoveWorkflowFunctionUp.jspa?atl_token=431030c172b9fa5634438f5889cf6f526896c192_lin&workflowMode=draft&workflowName=Approval+Testing&descriptorTab=postfunctions&workflowStep=1&workflowTransition=11&up=2) [Move down](https://seachefs.atlassian.net/secure/admin/workflows/MoveWorkflowFunctionDown.jspa?atl_token=431030c172b9fa5634438f5889cf6f526896c192_lin&workflowMode=draft&workflowName=Approval+Testing&descriptorTab=postfunctions&workflowStep=1&workflowTransition=11&down=2) [Edit](https://seachefs.atlassian.net/secure/admin/workflows/EditWorkflowTransitionPostFunctionParams!default.jspa?atl_token=431030c172b9fa5634438f5889cf6f526896c192_lin&workflowMode=draft&workflowName=Approval+Testing&descriptorTab=postfunctions&workflowStep=1&workflowTransition=11&count=3) [Delete](https://seachefs.atlassian.net/secure/admin/workflows/DeleteWorkflowTransitionPostFunction.jspa?atl_token=431030c172b9fa5634438f5889cf6f526896c192_lin&workflowMode=draft&workflowName=Approval+Testing&descriptorTab=postfunctions&workflowStep=1&workflowTransition=11&count=3)
   The value **cf\[10140\]** will be appended to field **Approvers**, or set if it is a multi field.
4. Move up Move down Edit DeleteUpdate change history for an issue and store the issue in the database.
5. Move up Move down Edit DeleteRe-index an issue to keep indexes in sync with the database.
6. Move up Move down [Edit](https://seachefs.atlassian.net/secure/admin/workflows/EditWorkflowTransitionPostFunctionParams!default.jspa?atl_token=431030c172b9fa5634438f5889cf6f526896c192_lin&workflowMode=draft&workflowName=Approval+Testing&descriptorTab=postfunctions&workflowStep=1&workflowTransition=11&count=6) Delete
   Fire a **Generic Event** event that can be processed by the listeners.

Conditions \& Validators

1. are all in the previous post

Manager Approval -\> 1st Level

Post functions :

1. The value of field **Approvers** will be cleared.
2. Move up Move down Edit DeleteSet issue status to the linked status of the destination workflow step.
3. Move up Move down Edit DeleteAdd a comment to an issue if one is entered during a transition.
4. Move up Move down Edit DeleteUpdate change history for an issue and store the issue in the database.
5. Move up Move down Edit DeleteRe-index an issue to keep indexes in sync with the database.
6. Move up Move down [Edit](https://seachefs.atlassian.net/secure/admin/workflows/EditWorkflowTransitionPostFunctionParams!default.jspa?atl_token=431030c172b9fa5634438f5889cf6f526896c192_lin&workflowMode=draft&workflowName=Approval+Testing&descriptorTab=postfunctions&workflowStep=10048&workflowTransition=21&count=6) Delete
   Fire a **Generic Event** event that can be processed by the listeners.

Conditions :

Issue transition will be blocked if there is a **pending** approval.

Validators :

0

and that is about every Transition I have modified.

and no I have not created any rule so far regarding this.

BR  
Vincent


Tags: cloud

jira-service-management

jira-service-management-cloud