"Bypass" (or mimic bypassing) initial status if issuetype = x

Issue #564 closed
Will created an issue

Background:

I received a request to create a new workflow for Task type issues. These issues will "skip" the initial status held by all new issues, Pending and go straight to the Open status, which typically follows "Pending" after a transition labelled Approve.

The workflow is very complex and rather than the traditional way of copying the workflow and then having the headache maintaining two nearly identical flows I think that wftoolbox might be able to do this? or maybe it can in its latest version(s)?

We are Workflow Toolbox version 2.1.37 and we cannot update at this point.

Question:

Is it doable on the Create step, if issuetype = "Task" to transition to the status "In Progress" as a post-function?

Thanks,

W

Comments (21)

  1. Will reporter
    • changed status to open

    Hello, This worked the first time I tested it but has at some point stopped working...? I've tried both these solutions, neither made a difference: (At the Create step)

    Method 2: (worked at least once)

    The field Issue status (delayed writing) will be set according to the evaluation of Issue type against the following set of rules:

    [%{Issue type} = "Task"]Open

    [%{Issue type} = "TaskMail"]New

    This feature will be run as jiraconn.

    Method 2: (just to troubleshooting method 1)

    The field Issue status (delayed writing) will be set according to the evaluation of Issue type against the following set of rules:

    (Task)Open

    (TaskMail)New

    This feature will be run as jiraconn.


    Related notes:

    • "jiraconn" is just a robot account that has full permission to the project.

    • This is done at the create step, used to bypass the initial "Pending" status and transition to either "New" or "Open" statuses depending on the issuetype. There are existing transitions TO those statuses FROM "Pending" and those both have the condition "Only if transition is triggered by a JIRA Workflow Toolbox post-function, i.e., hidding it to interactive JIRA users."

    • If I place it chronologically prior to the system post-function "Creates issue initially" I get an error atop the create screen that just reads: "Error NULL" in red. Placing it AFTER that creates the issue successfully but does not transition to the target status.

    The only other thing I can think to mention is that I have the jiraconn user account as value for --INPUT FIXED USER-- for the post function. It has every permission to the project.

    Any idea?

  2. Will reporter

    I also tried it instead with "Execute transition (delayed execution)" and used the transition name but that didn't work either

  3. Fidel Castro Armario repo owner

    Hi Will,

    Please, attach a screenshot of the post-function's tab. I want to see the configuration of all the post-functions in "Create Issue" transition.

    Which versions of JIRA and JIRA Workflow Toolbox are you using?

    Thanks.

  4. Will reporter

    We're on workflow toolbox 2.1.37 and we're (stuck) on Jira 6.1 (build 6144). We plan to update to Jira 7 but not for a while. Is that the latest version compatible with our jira version?

    I'll upload a screenshot but since this issue tracker is public I need to redact some lines.

  5. Fidel Castro Armario repo owner

    Hi @w_b,

    Yes, it is. It's a pity that you can't update to the most recent version of the plugin. It has so much new functionality...

    Please, attach a screenshot of the post-function's tab. I want to see the configuration of all the post-functions in "Create Issue" transition.

  6. Fidel Castro Armario repo owner

    Hi @w_b,

    Try the moving "Creates the issue originally" to first position in execution order.

    If it doesn't change anything, try selecting New comment as target field, instead of "Issue status (delayed writing)". After that, the post-function It will automatically create a comment with texts "Open" or "New" depending on the issue type. Let me know whether setting rules are being triggered depending on issue type as expected.

  7. Will reporter

    Moving Creates the issue originally to the first position in execution order did not have an impact on the problem.

    Setting target field to New Comment adds the correct target status name as the body of a new comment. (This is pretty neat, I can think of a few other applications for this post-function)

    What to try next? There are no conditions/validators on the workflow transition that would move these issues to those target statuses. That is, aside from the condition "Only if transition is triggered by a JIRA Workflow Toolbox post-function, i.e., hidding it to interactive JIRA users." which I assume shouldn't be interfering with this process.

  8. Fidel Castro Armario repo owner

    Set target field to "Issue status (delayed writing)" again, and use the following setting rules:

    (Task)Open : {delay=2000}
    (TaskMail)New : {delay=2000}
    

    That will force a delay of 2000 ms (i.e. 2 seconds) before trying to do the transition execution.

  9. Will reporter

    That doesn't seem to help. Also tried with "3000" as the ms value with the same results. I then removed the condition ("only if triggered by toolbox...") so that I could make sure that I could manually transition the issue using the workflow buttons - which does work, so the transition itself seems to be fine. I just couldn't trigger that condition/status as a workflow toolbox post-function.

    I tried this which now works for some reason:

    The field Execute transition (delayed writing) will be set according to the evaluation of Issue type against the following set of rules:

    (Task)task : {delay=2500}

    (TaskMail)taskmail : {delay=2500} <– these are just easy-to-remember transition names

    This feature will be run as jiraconn.

    I've sorted that in the execution order just above the functions that set the BSA1 and BSA2 fields. Not sure why but this config does work :) BUT it doesnt work when in a lower position.

    Thanks for you help as always :)

  10. Fidel Castro Armario repo owner

    It's very strange. Please, try removing : {delay=2500} also. Let me know whether it keeps working.

    Did you checked the log file for some error messages?

  11. Log in to comment