Trying to hide a custom field using Behaviours plugin JIRA 6.4

Hello,

For internal reporting purposes, we setup a couple of fields (Exec Root cause) to allow our Regional Support Managers to input information that could subsequently be extracted and relayed to our Leadership team for high visibility accounts.

We have a requirement however to hide these fields from our Customers.

On this basis, I am trying to define a field as hidden as per https://jamieechlin.atlassian.net/wiki/display/JBHV/JIRA+Behaviours+Plugin#JIRABehavioursPlugin-Example-SettingupaHiddenField

We are running JIRA 6.4. I have defined a new test field of type 'Hideable Free Text Field (unlimited text)'. The field is called 'Marys Exec Root cause'.

I followed the steps to define a Behaviour, add this field to it, define a condition and map it to one of our Customer projects (on our Test instance).

However, the following happens:

When I edit the ticket and populate the field with text when logged in as 'marykn' (user with full admin privileges), the field name remains visible but the text cannot be seen by either 'marykn' or by a test customer user. I would have expected that marykn would have full visibility of the field name & text BUT the external test customer user would not see anything
The new field does not have the option to define a search template for it (no search template available) which means it's not available as a field to search against.

Am i missing something? I've re-checked the configuration, I've enabled logging and have looked at the logs which report the following:

2015-05-27 23:13:52,772 http-bio-8081-exec-10 DEBUG marykn 1393x166x2 1x4rpxs 10.0.30.222 /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/validators.json [onresolve.jira.groovy.Behaviour] must be in role: 10001

2015-05-27 23:13:52,772 http-bio-8081-exec-10 DEBUG marykn 1393x166x2 1x4rpxs 10.0.30.222 /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/validators.json [onresolve.jira.groovy.Behaviour] user marykn(marykn) must be in role Developers

The marykn user has full admin privileges and does indeed belong to the 'developers' project role.

XML for the Behaviour is as follows:

<config use-validator-plugin="false" name="Hidden field" description="Behaviour to check hidden field" guideWorkflow="null">
 
  <field id="customfield_10681" required="null" readonly="null" hidden="true">
 
    <except role="10001"/>
 
  </field>
 
</config>

Any thoughts on what I might be missing or if I'm doing something wrong would be hugely appreciated.

Many thanks

Mary

behaviour.jpg

2 answers

0 vote
Gonchik Tsymzhitov Community Champion Dec 24, 2015

Sorry, 

Behaviours include Script Runner. 

But I have same ticket in JIRA 6.4.15

We cannot hide it either using some basic code

def dropDown = getFieldById("customfield_17158")
def conditionA = getFieldById("customfield_17159")

def selectVal = dropDown.getValue()

if (selectVal.toString().contains("ClearCase Message")) {
conditionA.setHidden(false);
} else {
conditionA.setHidden(true);
}

 

Is there a way to hide a custom field message to keep it clean on the screen.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

119 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you