Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Set Fields ReadOnly Based on User Group When Issue Transitioned to Cancelled Using Behavior?

Digvijay Singh Gehlot
Contributor
September 13, 2025

Hi Community,

Pre-requisites: 

  • I have three tabs on Issue View screen.
  • On each tab, there are two custom fields (Total 6)
  • When issue is in Open status, only first tab is visible to user.
  • When issue is in In Progress, only second tab is visible to user.
  • When issue is in Done, all three tabs are visible to user.

1.png

Requirement:

  1. When user (from specific group) transitions the issue from Open to Cancelled (Transition ID 1), then on Cancelled status, only first tab's fields should be Visible and in ReadOnly mode - other tabs (tab 2 & tab 3) should be hidden.
  2. When user (from specific group) transitions the issue from In Progress to Cancelled (Transition ID 2), then on Cancelled status, only second tab's fields should be Visible  and in ReadOnly mode - other tabs (tab 1 & tab 3) should be hidden.
  3. When user (from specific group) transitions the issue from Done to Cancelled (Transition ID 3), then on Cancelled status, all the three tab's fields should be Visible  and in ReadOnly mode.

I referred to this scriptrunner behavior example: 

https://www.scriptrunnerhq.com/help/example-scripts/make-fields-required-on-transition-for-user-groups-cloud

https://www.scriptrunnerhq.com/help/example-scripts/Make-field-read-only-based-on-user-groups-cloud

But I'm not getting any success as user from specific group is still able to edit the field on Cancelled. Fields should be editable only on other statuses instead of Cancelled.

Please guide on how to set fields ReadOnly on Cancelled by tracking the Transition ID and user group. 

Please provide a sample code using scriptrunner / any Post-Function which can be used for ReadOnly or any JMWE app to achieve the above as it will be a great help.

Thanks in advance.

1 answer

0 votes
Trudy Claspill
Community Champion
September 16, 2025

Hello @Digvijay Singh Gehlot 

Please provide a copy of the script that you have created that is not providing the expected results.

Can you clarify the intent of your requirements?

  1. Who should not be able to see the tab/fields - the user from the specific group or all users?
  2. When should this take effect?
    1. When the issue is in a specified status, regardless of how it transitioned to that status and regardless of who transitioned it?
    2. When the issue is in a certain status, but only if it got there through a specific transition, and only if that transition was executed by a user from a specific group?

Suggest an answer

Log in or Sign up to answer