Forums

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

How can we make a custom field non editable manually, it can only be edited through workflow

a855031 August 12, 2024

I am trying to make a custom field non edible by members of the project it can only change its value by the formula in workflow

4 answers

0 votes
Joe Pitt
Community Champion
August 13, 2024

Remove it from the create and edit screens and leave it on the view screen. If you only have one screen you'll need to create at least a view screen in the project. 

0 votes
Vijay Shanmugam
Contributor
August 12, 2024

Hi @a855031 ,

You can make the field as Read only using the Scriptrunner Behaviors feature.

0 votes
Heenaben Sardarbhai Chaudhary August 12, 2024

hi @a855031 ,

 

In Jira, field-level permissions (like making a field non-editable by users) are not directly supported out of the box. However, you can achieve this with a combination of workflow configuration and possibly custom scripting. Here's how you can handle this situation:

1. Use Field Configuration and Screens

You can configure field visibility and editability through field configurations and screens, but this approach has limitations:

  • Field Configuration: You can set a field to be "Required" or "Optional" but not to be editable in specific contexts. You would typically make a field hidden or visible based on the screen configuration.

  • Screens: Configure the screens used in the workflow transitions to include or exclude the field. For example, you can create a screen for transitions where the field is not displayed, effectively preventing users from editing it during those transitions.

2. Utilize Workflow Validators and Conditions

You can add workflow validators or conditions to ensure that the field's value is managed as desired:

  • Validators: Add a validator to the workflow transition to check the field value or ensure it meets certain criteria. This can prevent users from changing the field's value in an unwanted way.

  • Conditions: Use conditions to control the visibility of workflow transitions based on user roles or other criteria.

3. Custom Scripting with Jira Apps

If you need more advanced control, you might consider using Jira apps like ScriptRunner, which allows for more complex scripting and automation:

  • ScriptRunner: Use ScriptRunner or similar apps to create scripted fields or workflow post-functions. You can script the behavior such that the field value is automatically set based on a formula or other logic during specific workflow transitions.

  • Behaviors: In ScriptRunner, you can use "Behaviors" to make fields read-only based on certain conditions.

    Since Jira doesn't support field-level security directly, combining field configurations, screens, workflow validators, and custom scripting is often necessary to achieve the desired outcome. If you're using Jira Cloud, automation rules might also provide a solution.

0 votes
Trudy Claspill
Community Champion
August 12, 2024

Hello @a855031 

What options have you tried so far? And what has been the outcome of those methods?

Jira does not provide field level security to enable you to set permissions such as Edit or View per field.

Can you tell us more about your scenario? Can you show us the workflow where you are currently editing the field, and the formula you are using? If we have a full understanding of your scenario then we may be able to provide more relevant advice.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events