Linked Issue validation not working on create action.

Issue #878 resolved
S created an issue

The requirement : It should allow only following issue to be linked while creating an issue.

validation.jpg

Thanks & Regards, Suresh

Comments (7)

  1. Fidel Castro Armario repo owner

    Hi @suresh_babu_,

    It's not possible to limit issue link creation to only to the creation of the issue. What we can do is to use "Condition on linked issues" or "Boolean condition / validator with math, date-time or text-string terms" in some transitions of the workflow to hide a transition (using conditions), or showing a custom error message (using a validation) when executing a transition.

    We can use those features to limit the issue links or the characteristics of the issues to be linked. For example, we can limit the issue types, the statuses, the resolutions, field values, etc.

    Let me know if I can help you to implement any of those conditions or validations.

  2. S reporter

    Hi @fcarmario

    Thank you, just wanted to confirm again, We are looking only on issue creation only.

    When we are creating issutype A, it should not allowed me to link- issuetypeB(issuetypeB belongs to anther project) that has already been created.? Can't we achieve this?

  3. Fidel Castro Armario repo owner

    Hi @suresh_babu_,

    I'm not sure I have correctly understand your requirements, but try using "Boolean validator with math, date-time or text-string terms" in "Create Issue" transition with the following boolean expression:

    %{00014} = "IssueType A" IMPLIES count(filterByIssueType(linkedIssues(), "IssueType B")) = 0
    

    where %{00014} is field code for "Issue Type".

    Be careful to write the names of the issue types exactly, i.e., respecting the case and not introducing extra blank spaces.

  4. S reporter

    Thank you @fcarmario

    The requirement is again changed as per the management. Now, it should work as below.

    We have two projects:

    1. GT Load with the issue type name is ‘Epic’
    2. BUGS with the issue type name is ‘technical bug’

    We have custom field name called Tech Info single drown values are code,core,base and this field is associated to the Epic issuetype in the GT Load project

    We have Epic Link in the Bug project. Now validation, I should only link Epics which is the value of Tech Info = code while creating technical bug issue under BUG project.

    Please let me know if we need more details to configure.

    Regards,

  5. Fidel Castro Armario repo owner

    Hi @suresh_babu_,

    Try using "Boolean validator with math, date-time or text-string terms" validator in "Create Issue" transition of "Technical bug" workflow with the following boolean expression:

    count(filterByPredicate(linkedIssues("has Epic"), ^%{nnnnn} != "code")) = 0
    

    replacing nnnnn with field code for "Tech Info" custom field.

    Ensure that you are writing the name of the option (i.e., "code") exactly as it is, i.e., respecting the case.

  6. Log in to comment