Execution condition to check if projects with certain keys exist
Hi Support,
as Fidel suggested I would like to get in touch with you on a current challenge I’m facing with a Post Function in JWT.
The use case is, that the post function should create 1-or-multiple issues in (different) projects based on the component(s) that have been selected. Therefor I’ve planned to add the project key in the component as “Some Text (Project: KEY)”. In the post-function I use regexp to extract the KEY of the specific project from the components that are added to the source issue.
The post function looks as follows:
What I’m challenged with is the execution condition. I would like to add a condition that checks whether the project keys belong to valid projects. I’ve been trying to use “project = something” but get the error that an unexpected space has been found after project. Using issuesFromJQL() didn’t work either.
I was wondering whether you have an idea how to define the condition.
Thank you very much in advance, I appreciate your support!
Regards, Philipp Sendek
Comments (5)
-
repo owner -
reporter Hi Fidel,
thank you for your impressive swift reply! Unfortunately this string as the execution condition triggers a syntax error:
Trying to execute it anyway with component ("Personalmanagement (Project: ITEX)" where a project with key "ITEX" does exist) also threw an error:
If I can provide any more information, please let me know.
Regards, Philipp
-
repo owner Hi @psendek-brainbits,
The expression I provided is intended to be used for generating seed string for multiple issue creation. Look at the screenshot:
Parameter Conditional execution expects a boolean expression (i.e., an expression that returns
true
orfalse
), while the expression for seed strings returns a string list. That's the reason of the syntax error. -
reporter Hi Fidel,
sorry, now I see the brilliance of this adjustment, thank you very much! :-) This of course doesn't require a separate execution condition.
Again thanks for your very fast and excellent support!
Regards, Philipp
-
repo owner - changed status to resolved
You are welcome
- Log in to comment
Hi @psendek-brainbits,
Use the following string list expression for generating the seed strings:
where
%{00094}
is field code for Components.