Help for getting the a transition count

Issue #956 resolved
Onteddu, Rajesh created an issue

Hello JWT,

I wanted to know if there is a way where we can get the count for a transition of an issue. For an example: let's say if an issue is being reopened from a closed state, I want a custom field to count how many times this is being reopened. Can we do this using any of the features provided by Jira Workflow Toolbox? This would be great if it can do so. Please let me if this is possible.

Thank you, Rajesh.

Comments (5)

  1. Fidel Castro Armario repo owner

    Hi @ronteddu,

    You can use a "Calculated Number Field" with the following configuration:

    Captura de pantalla 2018-01-23 a las 10.09.47.png

    Expression is:

    count(timesOfTransition("Closed", "Reopened"))
    

    where Closed and Reopened are names of statuses.

  2. Onteddu, Rajesh reporter

    Hello @fcarmario ,

    Thank you for your help here. I have one more concern here please let me know if this is possible.

    When this transition is taking pleased there is Jira custom field and this field is a single-select drop-down field and there are options A, B and C. I want this count to increase only if this field has value B during this transition. Can we do that. Please let me know your opinion.

    Regards, Rajesh.

  3. Fidel Castro Armario repo owner

    Hi @ronteddu,

    In that case you should use a totally different approach. You should use an ordinary JIRA numeric custom field, and use "Mathematical and date-time expression calculator" post-function in transition from Close to Reopened with the following configuration:

    • Target field: "Number of reopening", an ordinary numeric custom field.
    • Formula: {nnnnn} + 1
    • Conditional execution: %{sssss} = "B"

    where nnnnn is field code for "Number of reopening" custom field, and sssss is field code for single-select custom field.

  4. Log in to comment