Setting issue security level after all attachments are uploaded

Issue #868 resolved
Arttu Hakanen created an issue

Hi,

I have a space in Confluence that anonymous users can access. They can make issues to JIRA using a form. To get the attachments from Confluence to JIRA, I had to give anonymous access to the corresponding JIRA project also.

What I can do is use the security level to set it as "internal" after the issue is done. But the problem is if there are multiple attachments, the users will get a failure message since the issue security level is set before all of the attachments are uploaded.

Is there a way to do it with your plugin e.g. the security level would be set after two minutes after the issue is created? Or if you have any other solution what I could use in JWT I'd be happy to hear about this. Thanks a lot!

Comments (9)

  1. Fidel Castro Armario repo owner

    Hi @arttuhakanen,

    You can try the following solution, but it will only delay setting the security level for 30 seconds:

    1) Create a reflexive transition called "Configure Issue" in initial status of your workflow (typically "Open"). Reflexive transitions are transitions with the same status as origin and destination, i.e., a transitions from Open status to Open status.

    2) Add condition "Transition is triggered by JIRA Workflow Toolbox post-function" to transition "Configure Issue".

    3) Add "Copy a parsed text to a field" post-function to transition "Configure Issue" with the following configuration:

    • Target field: Security Level
    • Parsing mode: basic
    • Text to be parsed: internal.

    Be careful to write the name of the security level exactly as it is.

    4) Add "Copy a parsed text to a field" post-function into "Create Issue" transition with the following configuration:

    • Target field: Transition Issue (delayed transition)
    • Parsing mode: basic
    • Text to be parsed: Configure Issue : {delay=30000}

    Add this post-function just before post-function for triggering the event. You can simply add it just after "Creates the issue originally".

  2. Arttu Hakanen reporter

    Hi, thank you very much. I'll try this solution. Is 30000ms the only delay time I can use? Or can for example 60000ms be used for getting a one minute delay? Thanks!

  3. Fidel Castro Armario repo owner

    Currently, there is a built-in limitation to 30 seconds in the custom delay. Anyway, if it's not enough, we can study the possibility to extend this limitation to 60 seconds or more.

  4. Arttu Hakanen reporter

    Hi!

    Just tested this and works great! Would be very very good if this could be set to 60 seconds. Hopefully this can be achieved at some point. Thanks!

  5. Arttu Hakanen reporter

    Hi, is there any possibility to extend the delay limitation to more than 30 seconds?

  6. Fidel Castro Armario repo owner

    Hi @arttuhakanen,

    I have raised a proposal for doing it. I think it will be included in next version of of JWT (2.3.2). I will keep you informed.

  7. Arttu Hakanen reporter

    Hi,

    I noticed that the 2.3.2. version is out now but was this included yet or will it be in the upcoming versions?

    Thanks! Arttu

  8. Fidel Castro Armario repo owner

    Hi @arttuhakanen,

    Yes, it's included in just released version 2.3.3. Sorry, for not having informed in this issue.

    BTW, I inform you that we have a new support site. Please, use it for your future questions and support requests.

    Thank you

  9. Log in to comment