Scriptrunner Behaviour mapping issues

Michele Ghirxi February 3, 2021

Hi,

I was testing some functionality with regards to behaviours and came across what seems to be unintended behaviour.

 

I have two projects, Project A and Project B (Completely fresh projects). I created a behaviour which is mapped to Project A. All the behaviour does is set the priority field as read-only.

tpo-behaviour.pngtpo-priority.png

When going to create the issue on Project A, the 'priority' field is set to read-only, which is what I want to happen. 

tpo-create.png

When I switch to Project B, the field is not set as read-only, however after clicking create it is set to read-only when it shouldn't be. It seems that it's carrying the behaviour over from Project A.

tpt-after-create.png

Has anyone encountered this behaviour before?

2 answers

0 votes
Fabiana Roxo May 7, 2021

Any update on this? Any solution?

0 votes
Lih Yao Tiong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2021

Hi @Michele Ghirxi 

Please correct me if I'm wrong:

Based on what I observed on the screenshot you attached, I noticed you only mapping the Behaviour to "Test Project One" Only.

This might be the reason read-only is not working on the project TPT Priority's field.

If you wish to apply the Behaviour to another project, could you please map the Behaviour to the other project/ select All Project while add mapping and see if it works?

Lih Yao Tiong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2021

Please ignore my previous reply, 

Based on my understanding, this should not happen.

May I know which SR and Jira version that you are using?

I will try to replicate this from my end to check on this issue.

Thanks!

Michele Ghirxi February 4, 2021

Thanks for your help! The below are what I am using.

Current Jira Software Version: 8.14.0

Current Scriptrunner Version: 6.18.0

Lih Yao Tiong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2021

Hi @Michele Ghirxi ,

Thanks for waiting :)

I have just done a few tests from my end (Jira 8.14 and SR 6.18.0), 

but it's working fine for me.

Just in case I replicating this issue in the wrong way, could you please provide a demo video on replicating this issue?

Michele Ghirxi February 5, 2021

Hi @Lih Yao Tiong 

Below are the steps to reproduce and also a gif:

  • Have two projects available
  • Create a Behaviour which is mapped to Project One (All issue types)
  • Add the field priority and set it as read-only
  • Go to Project One.
  • Click "Create" from the Jira menu bar.
  • Select Project One and select an issue-type that has the priority field.
  • Check if it's read-only. (It should be read-only as intended)
  • Change to Project Two and to an issue-type that has the priority field.
  • Click on "Create" and the priority field will become read-only.

replication-gif.gif

Lih Yao Tiong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2021

Hi @Michele Ghirxi 

Thanks for providing the gif and steps!

You're right, I'm able to reproduce the same issue from my end.
It seems like it's a bug, but I'm not sure about it yet.

Could you please raise a support ticket at https://productsupport.adaptavist.com/servicedesk/customer/portal/2 ?

Please mention my name and this community question in the support ticket so that I can continue assisting you there :)

Lih Yao Tiong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2021

Hi @Michele Ghirxi 
Thanks for providing the gif and steps!
You're right, I'm able to reproduce the same issue from my end in this way.
It seems like it's a bug, but I'm not sure about it yet.
Could you please raise a support ticket at https://productsupport.adaptavist.com/servicedesk/customer/portal/2 ?
Please mention my name and this community question in the support ticket so that I can continue assisting you there :)

Suggest an answer

Log in or Sign up to answer