Enforce that issue in "Project A" can only be linked to issue in "Project B" if assignee on issue in "Project B" = johndoe?

Issue #640 closed
Will created an issue

As title states: we'd like to prohibit linking to an issue if the issue in the other project is not a certain person.

That is the requirement as it was described to me but perhaps there's some more creative way of doing such a link.

Have you had any similar requests?

Thanks,

W

Comments (6)

  1. Fidel Castro Armario repo owner

    You can add the following validation in some transitions of your workflow. This validation will detect forbidden issue links, and will keep transitions blocked until the forbidden issue links are removed.

    The validation can be implemented using "Boolean validator with math, date-time or text-string terms" with the following boolean expression:

    (%{00018} = "PRJA" IMPLIES count(filterByPredicate(linkedIssues(), ^%{00018} = "PRJB" AND ^%{00003} != "johndoe")) = 0) AND ((%{00018} = "PRJB" AND %{00003} != "johndoe") IMPLIES count(filterByProject(linkedIssues(), "PRJA")) = 0)
    

    Where:

    • PRJA and PRJB are project keys for Project A and Project B respectivement.
    • %{00018} is field code for Project key.
    • %{00003} is field code for Assignee.

    You can add this validation transitions of the workflow used by both projects.

  2. Will reporter

    Thank you I'm going to give this a try.

    What I think that it misses is linking to other issues within the same project should be allowed - PRJA to PRJA is ok regardless of assignee. PRJA to PRJB, assignee must be the johndoe. Does it account for that?

  3. Log in to comment