Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Post function to copy field value not working

Zaldy Parian
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.
November 23, 2023

Hi all,

I've search the community page for similar issue as mine, but could not find the right answer. Maybe someone can help, please.

In our SR workflow, the starting status is 'Waiting for approval'. And the SR have 2 custom fields: AD Manager (single user pick) and Approvers (multi users pick).  I then created a post function at the transition to 'Waiting for approval'. But it is not working at all, even if I tried other fields with the same type.

Appreciate your guidance and help.

post_function2.png

Regards,

1 answer

0 votes
Ste Wright
Community Champion
November 23, 2023

Hi @Zaldy Parian 

It might be linked to this bug, JRACLOUD-73278 - however, I did try this and it worked for me.

Are you sure there's not a conflicting post-function, script, or automation rule which might be causing this?

The alternative is to use Automation to do this instead :)

Ste

Zaldy Parian
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.
November 23, 2023

Hi @Ste Wright ,

Thanks for your reply.

No other workflow transition that is using those fields. And it could be very much related to ticket you referenced above; because I also tried Report to Assignee to check it on same field types. And it did not work either.

I turned off the automation because it is counting very high against our monthly usage quota. 

I guess I'll find another alternative or stick to manual update.

Cheers,

Ste Wright
Community Champion
November 23, 2023

I did try your specific scenario (custom single user picker, Approvers field) and it worked for me.

Is the Approvers field on the Screen?

Ste

Zaldy Parian
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.
November 23, 2023

Yep, both fields are present in the edit and view screens.
Maybe because the Approvers field is multi user picklist and the AD Manager is a single user picklist??

Ste Wright
Community Champion
November 23, 2023

I tried with that exact setup and it worked.

Is there anything in the Issue's History post-creation? 

Is the Approvers field blank post-creation, or populated with incorrect information?

Ste

Zaldy Parian
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.
November 23, 2023

I checked few issue records, nothing in the History tab that will indicate failure or error post creation. And the Approver field was not updated at all; in fact, it remained blank.

Ste Wright
Community Champion
November 30, 2023

Strange! Have you tried with a different field with the same field type?

Ste

Zaldy Parian
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.
November 30, 2023

Yes, I tried same logice/script to copy Reporter to Assignee; which are both single user picklist. But no luck. :-(

Anyway, I'll try ScriptRunner (which I'm not familiar with).

Ste Wright
Community Champion
November 30, 2023

Or, provide screenshots of your setup.

As I say I tried this and it worked.

Ste

Zaldy Parian
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.
November 30, 2023

Hi @Ste Wright ,

Big thanks for your extended patience on this.

Here are some screenshots:

1. Workflow transition
2. Post function action
3. Copy source to target fields
4. Post function list
5. After creating a new issue record, the Approvers field still remains blank (None).

Maybe because the Approvers field is multi-users while AD Manager field is single-user picklist???

post_function_1.pngpost_function_2.pngpost_function_3.pngpost_function_4.pngpost_function_5.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events