Skip JWT validator for Exocet operation

Issue #928 new
Nadine
created an issue

Hello Fidel

I would like to use your Users in a field are/aren't in a project role validator to deny the permission to create certain issue types and it works great.

However, I need the restricted issue types to create issues through an Exocet operation so is there any option like Transition is triggered by a bulk operation. Transition is triggered by a JIRA Workflow Toolbox post-function. * Current issue is being created by cloning. Only makes sense in Create Issue transition

which could help skip the validator when creating the issue through Exocet?

(By the way, I am also using your Create linked issue-PF to create issues but I am afraid it won't work in one specific scenario since I need the user to add data to an issue during its creation, which is only available through Exocet).

Any suggestion would be highly appreciated.

Best regards

Nadine

Comments (9)

  1. Fidel Castro Armario repo owner

    Hi @Nadine,

    Do issues created by Exocet have a special mark or some difference we can use to differentiate when the issue is created by Exocet? For example, some substring present in the summary or description, some value in a custom field, or a specific reporter, etc.

    If we have a way to differentiate when issues are being create by Exocet, we will be able to write a validation using "Boolean validator with math, date-time or text-string terms".

  2. Nadine reporter

    Hello again,

    I have added a label Exocet to be added to my issue when it's created via Exocet and that is set correctly.

    I have also added the following validator on the Create-Operation :

    Only if the following boolean expression is true: %{Labels}~"Exocet" Message to show when validation fails: "Label is missing".

    When I try to create an issue via Exocet, the validation fails and no issue can be created.

    Am I missing something?

  3. Fidel Castro Armario repo owner

    Your boolean expression is correct. The problem might be that Exocet is adding labels after actual issue creation, and when the validation is checked the label is not yet added.

    Please, try setting an ordinary text custom field instead of a label. The reason to try this is that some system fields have special behavior and requires to be set after actual issue creation. Maybe Labels is one of them.

    If it doesn't work, please, attach a screenshot of the configuration you are using in Exocet for creating the issue. I will try to reproduce your problem and to find a solution.

  4. Nadine reporter

    Sorry, haven't been in the office for a week, need to get working on this again and will hopefully be able to close this issue successfully tomorrow :)

  5. Nadine reporter

    Hello @Fidel Castro Armario

    Finally, I found some time to test this again:

    I set up a text field Tag and configured Exocet to pre-fill the field with the term Exocet when the issue is created via Exocet.

    My JWT validator on the Create-Transition looks like this: Only if the following boolean expression is true: %{Tag}~"Exocet". Message to show when validation fails: "Tag is missing".

    When I add the Tag-Field to the Create-Screen and leave it visible in the Field Config, it works fine - Exocet fills the field with the term Excocet and the issue can be created. However, when the field is set to hidden, the issue cannot be created and the JWT error message is shown.

    Obviously, I wondered whether Exocet can actually set a field that is hidden so I tried the whole operation without the JWT validator and the Tag-field set to hidden. Turns out that the field is preset by Exocet even when it is hidden in the field configuration.

    Hence, it seems as if the JWT validator cannot check fields that are hidden - can you confirm this?

  6. Fidel Castro Armario repo owner

    Hi @Nadine,

    JWT validates also hidden fields. I think that the problem is caused by the fact that Exocet is setting hidden fields just after issue creation, not at the moment of creation itself. JWT on the other hand executes the validation just before actual issue creation.

    Can you, please, try not hiding the field in the Field Scheme, but simply not including the field in CREATE, VIEW and EDIT screens? That's another way of making a field invisible.

  7. Nadine reporter

    Hello @Fidel Castro Armario

    I tried leaving the field off all screens as well but, apparently, that means that Exocet does not set the field at all. Hence, I guess I am stuck here until Exocet will implement Option to select the author of a local Jira operation.

    Anyways, thanks a lot for your help.

  8. Log in to comment