Forums

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

Read only Behaviours doesn't affect view screen inline editing?

Deleted user July 24, 2019

Hello,

we run Jira Software 7.11.0 and Script Runner 5.5.6 and several Read-Only Behaviours for  Custom Textfields. Now we face the problem, that our Behaviours only affect the Edit Screen while on the View Screen these fields could still be editable using the inline edit functionality.

Are there any options to make the "inline edit" functionality also read only without using a "Read-Only textfield" from the very start?

3 answers

1 accepted

0 votes
Answer accepted
Tom _Automation Consultants_
Atlassian Partner
July 24, 2019

Remove the field from the edit screen if they're read only. That way you don't need to use behaviours to make them read only.

Deleted user July 24, 2019

Thanks for reply, but we need them on the edit screen since we're using Backbone Sync to write a linked tickets status into a field for example. We just need them to be Read-Only for users on Edit and View Screen.

Tom _Automation Consultants_
Atlassian Partner
July 24, 2019

No worries, there is an answer here https://community.atlassian.com/t5/Jira-questions/Read-only-field-only-in-view-screen/qaq-p/982404

tl;dr 

This needs to be in the behaviours initialiser:

def customField = getFieldById("custom_field")
customField.setAllowInlineEdit(false)

 

Deleted user July 26, 2019

Thanks i tried it, first it didn't work, then we updated SR to newest version 5.5.9 i guess and tried cf1 = set.ReadOnly(true) and it works now. Dunno why your code doesn't have any impact on our instance.

0 votes
Hemant August 4, 2020

I am unable to get this to work as well. I have around 50 fields some of which are being made read only depending on the group a user belongs to. If he belongs to x group, he can edit otherwise he cannot. This functionality works perfectly fine in the edit screen but users are able to edit fields in view screen using inline edit. 

This is a functionality we really need to get to work and disabling inline edit for the whole JIRA seems to be the only option we are left with (which is horrible) . Are there any other ways i can disable inline edit just for a single issuetype/ workflow. @Tom _Automation Consultants_ 

I tried using the setAllowInlineEdit(false) in the behaviour initializer. Does not work unless we add to field beh

0 votes
Matthias Gaiser _K15t_
Community Champion
July 24, 2019

Hi @[deleted],

you mentioned you're using Backbone Issue Sync and that's the reason why you don't remove the fields from the edit screen as @Tom _Automation Consultants_ suggested. I'm working for the Backbone team and can tell you there is a way to use Backbone and remove the fields from the edit screen.

You can configure Backbone so that it does not use the edit operation to update the issue, but a transition instead.
You would need to create a global looped transition, assign a screen to it with all the fields you want to update with Backbone and configure the advanced setting sync.editTransition - see our docs for more information.

Now, you can choose which solution you prefer.

Cheers,
Matthias.

Deleted user July 26, 2019

Thanks i tried Thomas' code already and it worked more or less

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events