I'm trying to implement this:
https://jamieechlin.atlassian.net/wiki/display/JBHV/Miscellaneous+Behaviours+Examples#MiscellaneousBehavioursExamples-Showorhidefields
in the exact scenario. We have users who abuse Blocker, so I wanted to create a justification window with a custom note if a user selects blocker.
I configued the Custom Field...and I set up the Behavior on Priority to either show or hide this field if blocker is selected, but it doesn't seem to do that...this is something I need for the Create Issue Screen. Not sure what I'm doing wrong?
Hi Jamie,
I using behavior to hide comments. It was working fine few days back now it is not working. in fact it is not working anything now.
Here is xml for your reference:-
<config use-validator-plugin="false" name="Hide Comments " description="WMS_WF" guideWorkflow="WMS_WF_Jan_6_2015">
<field id="comment" required="null" readonly="null" hidden="true">
<when action="541"/>
<when action="61"/>
</field>
</config>
I enabled logging and found following error:-
2015-01-06 09:51:29,744 http-bio-9091-exec-67 ERROR RXS0VH3 591x29122x1 1fuav3m 10.252.104.57 /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/validators.json [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
java.lang.NullPointerException at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.acceptGetProperty(GetEffectivePojoPropertySite.java:51) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at com.onresolve.jira.behaviours.BehaviourManagerImpl.getBehaviour(BehaviourManagerImpl.groovy:260)
at com.onresolve.jira.behaviours.restservice.BehavioursEndpoint.getValidatorsFromIssueId(BehavioursEndpoint.groovy:44)
at sun.reflect.GeneratedMethodAccessor817.invoke(Unknown Source) <+1>
at java.lang.reflect.Method.invoke(Unknown Source) <+19> (DispatchProviderHelper.java:234) (DispatchProviderHelper.java:100)
getFormValue returns a string, it looks like an integer though. getValue() should return an actual priority object which you can call .getName() on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One other question...does the getFormValue method always return an integer? So, 1 = Blocker, 2 = Critical, etc. or do I have to modify it to match the actual String values of my priorities?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think so... but I would just paste it in to the box where you currently have it, but without the public blah() {...}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oops. i missed that part of the instructions. So I can add that method to the existing ScriptSample.groovy file, yes?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should be a script not a method. Looks like you are just defining a method but nothing will call that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you apply the behaviour to a project? Can you paste relevant screenshots?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.