Cannot validate a reguluar expression when editing an issue.

Issue #3 resolved
Mikael Lejdstrom created an issue

Hi ! Your plugin works well when i tested it in our workflows. However Validation can be done only during workflow transitions. This is not satisfactory for our use. I want it validated against a regular expression when I edit it. It must NOT be possible to enter a value that NOT matches the expression into our custom field. Have you a solution to this ?

Comments (2)

  1. Fidel Castro Armario repo owner

    Hi Mikael,

    The only solution I find is to remove permissions to edit issue from permission scheme, and include in all the statuses of your workflow where you want to allow the issue to be edited, a reflexive transition (same source and target status) with a screen associated containing all the fields you want to allow to be edited. Then you could include one or more validators to check the values introduced in transition screen.

    In cases of big workflow with many statuses, implementing this solution using JIRA workflow editor, might be a bit cumbersome. You could implement it more easily this way:

    1. use JIRA workflow editor to include a reflexive transition with edit screen and all the desired validators in a status of the workflow.
    2. export the workflow as XML, and copy + paste the reflexive transition in all the statuses of the workflow.
    3. import in JIRA the edited XML file and include it in a workflow scheme that will replace the current one.

    I think this solution might be satisfactory for your requirements.


  2. Log in to comment