How to make a custom field on isssue screen visible readonly and only programmatically updatable

Smita April 16, 2019

I want to have a custom field on JIRA issue to be visible on all screens ( Edit/View) but it should not be editable by end JIRA user .

I want to set the value during creation programmatically ONLY and then it should just be visible to user 

How can this be achieved using OOTB JIRA Cloud Funcrionality. Kindly help

1 answer

1 vote
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2019

Hello @Smita 

What you want is not possible "OOTB JIRA Cloud "

Also, why do you want the custom field to be available on the create/edit screen and still not being editable? Isn't it just going to confuse the user?

What you want can be somewhat achieved using scripted field which are not fully supported yet on cloud.

Please see this question

https://community.atlassian.com/t5/Jira-questions/Is-there-any-way-to-create-calculated-fields-in-JIRA-Cloud/qaq-p/231346

http://scriptrunner-docs.connect.adaptavist.com/jiracloud/script-listeners.html#_run_as_user

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2019

What I suggest to you, is to have a custom field only on the view screen and give the ability to the user to update it via transition screen or have some login in place to update the field via transition post-function.

Smita April 16, 2019

Hi Tarun, this field represents a customer support number that becomes available automatically during the issue creation and we don't want that to be editable by user directly. It should always be put or stamped on the issue at the time of creation and that too programmatically .

Tarun Sapra April 16, 2019

Based on your description, it's best to use a custom field and have it only on the view screen of the issue and update the value of the field programmatically via the post-function of the create transition.

Like Smita likes this
Smita April 16, 2019

When I hide it from Create/Edit Screen - the programmatic access fails. I always thought screen is just a representation of an issue type but looks like its a class that the programmatic access uses to create an issue object , so when I don't have the field on create screen - the rest API fails..... I am not sure how we could restrict this.

 

I also thought if we could have issue action level permission to be given to certain users - which looks to be possible using Validator BUT then this cannot be restricted to a certain issue type .

Any suggestions?

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2019

Hello @Smita 

If you are using REST API to update the field, then you need to field on the edit screen while updating and create screen while creating issue.

Since Jira doesn't have field level permission hence this is an open ticket for jira cloud, wherein you can hide the field for specific groups/roles

https://jira.atlassian.com/browse/JRACLOUD-69298

Smita April 16, 2019

If using Atlassian SDK , is that possible? I am not sure ..asking

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2019

Atlassian SDK is for server platform, for cloud platform it's Atlassian connect.

https://developer.atlassian.com/cloud/jira/platform/integrating-with-jira-cloud/

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2019

Hello @Smita 

If you feel my answer has helped you, please accept/upvote so that others are also helped. thanks.

Smita April 18, 2019

hi Tarun, I found a simple way to do it. Let me share it 

Suggest an answer

Log in or Sign up to answer