Post function - Write field on issues returned by JQL

Issue #244 resolved
Shai Dahan created an issue

This issue is related to Issue #188

Hello Fidel,

I have a post function called "Edit Business Priority":

2016-02-16 17_16_08-Update Workflow Transition Write field on issues returned by JQL query Function .jpg

Validation:

2016-02-16 17_17_38-Update Workflow Transition 'Boolean validator with math, date-time or text-strin.jpg

Condition:

2016-02-16 17_18_58-Update Workflow Transition Boolean condition with math, date-time or text-string.jpg

post_function.jpg

I would like to add an option to clear the value of "TPM Business Priority" When I action "Edit Business Priority", I would like to be able to clear the value (meaning delete the rank which now have to be a value of 1 to 50), for example issue which have been closed.

Now if the issue which I've cleared was ranked 5, all the rest of the issues below 5 need to step forward 1 position up:

6 to 5

7 to 6

8 to 7

.

.

.

50 to 49

Comments (7)

  1. Fidel Castro Armario repo owner

    Hi Shai,

    Do the following changes:

    1) Edit boolean validation at transition "Edit Business Priority" using the following boolean expression:

    {17004} = null OR {17004} >= 1 AND {17004} <= 50
    

    2) Edit post-function "Write field on issues returned by JQL query" at transition "Edit Business Priority" using the following source math expression:

    {17004} = null OR {17004} > previousValue({17004}) ? (^{17004} > previousValue({17004}) AND ({17004} = null OR ^{17004} <= {17004}) ? ^{17004} - 1 : ^{17004}) : (^{17004} >= {17004} AND ^{17004} < previousValue({17004}) ? ^{17004} + 1 : ^{17004})
    
  2. Shai Dahan Account Deactivated reporter

    Hello Fidel,

    The atlassian-jira.log is attached here. The issue occurred on TPM-591 and you will find it in the end of this file.

    "2016-02-17 08:46:04,605 http-bio-8080-exec-1514 ERROR shai.dahan 526x2677972x2 1g2t0n5 195.244.215.160,127.0.0.1 /secure/CommentAssignIssue.jspa [atlassian.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action 791 from workflow 291925 on issue 'TPM-591' "

  3. Fidel Castro Armario repo owner

    Edit condition in post-function "Edit Business Priority" for using the following boolean expression:

    {11900} != null OR hasChanged({11900})
    
  4. Log in to comment