Custom field read-only after transition

Issue #418 resolved
Bharath Kumar created an issue

Hi Fidel,

I have a scenario where I will have to make some custom fields in the issue read-only after a particular transition, can this be achieved.

Lets say I have fields field A, field B and field C and I have the following workflow

subtask sizing.jpg

and till Initial Sizing Complete I would like the fields to be editable and after that state I want all the three fields to be read-only, can you please help me on this.

Comments (7)

  1. Fidel Castro Armario repo owner

    Hi Bharath,

    I can give you a solution that requires to remove the fields A, B and C from edit screen, make them editable only using a reflexive transition. I explain you the solution step by step:

    1) Remove fields A, B and C from edit screen, keeping them in view screen, and create screen in case you need them to be set during issue creation. If you are currently sharing a same screen for edit operation and view and/or create you will have to create a separate screen only for edit screen.

    2) Create a screen called "Restricted Edition Fields" and add fields A, B and C.

    3) Create a global reflexive called "Edit special fields" (you will surely find a more suitable name) and associate "Restricted Edition Fields" screen to it.

    A global transition is available from any status, and a reflexive transition has the same origin and destination status. The following screenshot shows how to create these kind of transitions.

    4) "Boolean condition with math, date-time or text-string terms" to transition "Edit special fields" with the following boolean expression:

    %{00016} in ["Open", "In Initial Sizing"]
    

    Note that:

    • %{00016} is field code for Issue status
    • You should respect the case when writing the name of the statuses in the boolean expression. Take into account that JIRA UI usually shows the name of the statuses in upper case, but the actual name may have different case. Check the exact name of the statuses at Administration > Issues > Statuses.
  2. Bharath Kumar reporter

    I have one question can we have the condition during the Status "INITIAL SIZING DONE" (in the transition that leads to that status) so that we avoid the global transition.

  3. Fidel Castro Armario repo owner

    You can use 2 identical reflexive transitions in statuses "Open" and "In Initial Sizing". In this case you don't have to use the boolean condition.

  4. Log in to comment