post function status condition

valkyre57 May 18, 2021

i am trying to add assignee when condition is status "trtrtrtr". the test passes well but assignee not working.... what i am doing wrong?

Screenshot_1.png

3 answers

1 accepted

1 vote
Answer accepted
Suprija Sirikonda _Appfire_
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.
May 18, 2021

Hi @valkyre57 ,

Note that all the clauses must be inside a single {{ }} block : 

 

JMWE 1.png

 

And, of course, the user executing the post-function must have assign issues permission.

Thanks,

Suprija

valkyre57 May 18, 2021

i tried single block too. user has permissions.

Suprija Sirikonda _Appfire_
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.
May 18, 2021

Hi @valkyre57 ,

Did you test without the Conditional Executional script? - i.e., is the Assignee being set correctly without the conditional execution script?

As you are checking for the status of the issue - note that the issue's status will be either the Status before the transition or the Status after the transition - as post-functions in cloud run asynchronously

If you want to check the destination status : use transition.to_status

{{ issue.fields.issuetype.name == "Bug" and transition.to_status == "rtrtrtrtr" }}

Else, if you want to check the source status : use transition.from_status

{{ issue.fields.issuetype.name == "Bug" and transition.from_status == "rtrtrtrtr" }}

 

Thanks,

Suprija 

valkyre57 May 19, 2021

transition.to_status WORKED 

thanks a loooot !

Suprija Sirikonda _Appfire_
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.
May 19, 2021

Hi @valkyre57 ,

I'm glad it worked! Please feel free to accept my answer if it helped you.

 

Regards,

Suprija

1 vote
Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2021

Hey @valkyre57 ,

have you checked that the user is available as an assignee (assignable user project permission) and if the executing user of the post function is also able to assign the issue? You should also be able to troubleshoot this with the help of the status and log page of the app. :)

Best, Max

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2021

Hi @valkyre57  - Why don't you just use an Automation for Jira rule to set the assignee based on those conditions? 

valkyre57 May 18, 2021

it is limited :( and that why i am trying to create post function.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2021

It will do what you are tying to do in this case  :-)

Like Max Foerster - K15t likes this

Suggest an answer

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

Atlassian Community Events