Validator to enforce Linked Issues/Issue fields to be populated when transitioning a Bug to In Progress and on

Issue #662 resolved
Tomas Arguinzones Yahoo created an issue

Hi...I need your assistance with this request...I have a request that when a Bug is to be transitioned to In Progress (and any transition from In Progress until the Bug is Closed) the Issue Linked must have the value of "affects to" (only that value) and the Issue must be a Story (only one Story and not more than one). It is that possible?

Thank you in advance for your assistance

Comments (5)

  1. Fidel Castro Armario repo owner

    Hi @targuinzones,

    Use "Boolean validator with math, date-time or text-string terms" with the following boolean expression:

    count(linkedIssues("affects to")) = 1 AND
    count(filterByIssueType(linkedIssues("affects to"), "Story")) = 1
    

    or this other one if you only want to allow only 1 issue link type:

    count(linkedIssues()) = 1 AND
    count(linkedIssues("affects to")) = 1 AND
    count(filterByIssueType(linkedIssues("affects to"), "Story")) = 1
    
  2. Tomas Arguinzones Yahoo reporter

    Hi Fidel...thank you for the quick reply and your assistance. It works like a charm and you did answer what I asked for but in the process you have opened a pandora box :-) I came up with a couple of situations and hopefully you can guide me about how to get around those: - once the Bug is In Progress, the condition in the validator of course does not execute so the user can edit the Bug and add links there and I want to restrict that (any suggestion?)- is there a way to only display "affects to" in the Issue Linked field and only Stories in the Issue field for Bugs. I understand the validator "Blocks" the transition and that was what I asked you and your solution works but I am just wondering how to accomplish that, to only shows the issue link type and the issue types that I want for Bugs. Thank you for your assistance

  3. Fidel Castro Armario repo owner

    Sorry @targuinzones, but it's not possible to limit the issue link types and the issue types shown to the user for linking issues. We can only check the linked issues using a condition or a validator.

  4. Tomas Arguinzones Yahoo reporter

    Hi Fidel...thank you very much for your assistance...please go ahead and close this issue. Thanks again!

  5. Log in to comment