I added behaviour(0.5.6) plugin in jira ?
added one behaviour to that plugin.
added one field using fallowing script
**********
log.debug "Debuggering..."
FormField descField = getFieldById("description")
log.debug "added text field..."
descField.setFormValue("Observation") // insert text value
log.debug "end of Field:
**********
Added "Validate Jira Requiredness" as enabled, "Use Validator Plugin " as enabled and
Required (Optional)
Writable (Readonly)
Shown (Hide)
i used these properties while creating the behaviour but am not able to see the logs in console atleast first statement also. Script is also not working to create custom field.
Is this correct process am fallowing?If not suggest me the correct process.
Have you mapped the behaviour to a project, and are you testing with that project? If not an orange warning method should be shown on the behaviour.
Have you set the logging level to debug by click the link on the page that lists all behaviours? If you are not sure change log.debug to log.warn.
Yes i mapped behaviour to a project , am testing with that project only. And i set logging as enabled, i tested with log.warn also then also am not able to create the template.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
give me other any ways to create custom text field in description field. and to execute the script in behaviour plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you see any log output at all?
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.
Is it definitely the system description field? If you go to the behaviours page, you can click edit, and you should see it as XML. Can you paste that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is the description field where we can give our description about the issue, while creating the Bug in jira.
<config use-validator-plugin="true" validate-jira-requiredness="true" name="raga" description="raga" guideWorkflow="null">
<field id="versions" required="true" readonly="null" hidden="false" validator="server" validator-class="" validator-script="log.debug "Debuggering..." FormField descField = getFieldById("description") log.debug "added text field..." descField.setFormValue("Observation") // insert text value log.debug "end of Field: "" validator-method="">
<when user="admin"/>
</field>
</config>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
now when am trying to map the behaviour with project by clicking on map the behaviours to projects which is there in edit behaviour place am getting error in chrome(29.0.1547.66 m), firefox
XSRF Security Token Missing
Your browser has not provided any parameters at all and your input has been lost. Press back now to try and resend the data. This is most likely caused by a bug in the browser. FireFox 3.6.0 have been known to exhibit this behavior.
For more information see this bug report http://jira.atlassian.com/browse/JRA-20696
JIRA could not complete this action due to a missing form token.
You may have cleared your browser cookies, which could have resulted in the expiry of your current form token. A new form token has been reissued.
Request URL: /jira/secure/admin/Behaviours.jspa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This behaviour is on the affected versions field - seems like it should be on the description field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank u very much Jamie Echlin, by changing the field as description for my behaviour am able to add template in description filed.
*Observed Behaviour*
<describe what happened>
*Expected Behaviour*
<describe what should have happened>
*Impact*
<what impact will this defect have?>
But when am going to enter any text in description field , the text getting clear when i came out from description field. Only am able to see template structure after came out from this field.
i added my script like this :
**************
log.debug "Debuggering..."
FormField descField = getFieldById("description")
log.debug "added text field..."
descField.setFormValue("*Observed Behaviour*\r<describe what happened>\r\r*Expected Behaviour*\r<describe what should have happened>\r\r*Impact*\r<what impact will this defect have?>")
log.debug "end of Field: "
**************
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just check the description is empty before you set it, if not don't set it.
Also can you vote up some of my comments and answers, if they have helped you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes definatly ur comments are helped for me. can u please tell me how can i validate my template space between two fileds like Observed Behaviour , Expected Behaviour.
*Observed Behaviour*
*Expected Behaviour*
*Impact*
If the space between these two fields is empty i have to show an error msg.
I tried with the fallowing script but it is not working.
if (descField.getValue() == "") {
descField.setFormValue("*Observed Behaviour*:\r\r*Expected Behaviour*:\r\rReproduce steps:\r\rAdditional information:\r\rAdded log files/flows etc.:")
String priority = (String) descField.getFormValue()
log.debug "added text field..."+priority
if(priority.subString(priority.indexof("*Observed Behaviour*"), priority.indexof("*Expected Behaviour*")) == ""){
descField.setHelpText("<div class=\"warningBox\">please fill the template which is used for bug description.</div>")
}
and tried with removing the (*) also
but it is giving
groovy.lang.MissingMethodException: No signature of method: java.lang.String.indexof() is applicable for argument types: (java.lang.String)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to click the "like" button to show your appreciation!
indexof should be indexOf.
But I recommend using a regexp - there are plenty tutorials for groovy and regexes out there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie
can u please suggest me about my problem in removing space between two fields
*Observed Behaviour*
*Expected Behaviour*
*Impact*
To remove the space between these templates i tried
FormField descField = getFieldById("description")
log.debug "added text field..."
//check status
if (descField.getValue() == "") {
descField.setFormValue("Observation\r\rExpectation\r\rReproduce steps\r\rAdditional information:\r\r
Added log files/flows etc.:")
}
if (descField.getValue() != "") {
String priority = (String) descField.getFormValue()
log.debug "sssssssssssssssssssss "+priority
priority.replaceAll("[\r\r]", "")
priority.replaceAll("\\s+", "")
but am not able to remove space between two fields
priority string is giving string like
Observation
Expectation
Reproduce steps
Additional information:
Added log files/flows etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I already suggested - use a regex.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie
How can i get the status of jira like open, close, inprogress
i tried with the fallowing code
FormField statusField = getFieldById("Status")
log.debug "Status..."+((String)statusField.getFormValue())
It is giving null
I need to check for open status issue
my issue in jira is in open status but am not able to get the status field as Open
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
underlyingIssue.statusObject.name
If the behaviour is in a transition you can use getDestinationStepName(), or getDestinationStep().
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank u Jamie it is working with
underlyingIssue.statusObject.name for status
And also i tried with underlyingIssue.issueType.name it is giving always Bug for my jira if it is task also.
why it is giving always as bug. please suggest me about this.
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.