Trying to hide a custom field using Behaviours plugin JIRA 6.4

Mary Kingston June 3, 2015

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 votes
Kevin Dalton September 22, 2016

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.

Manuel July 16, 2019

You can use message field app.

https://marketplace.atlassian.com/apps/1219615/message-field

The provided message field can be controlled with behaviours.

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 24, 2015

Sorry, 

Behaviours include Script Runner. 

But I have same ticket in JIRA 6.4.15

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events