I have created a Custom Field (Number) called 'Failed Count' with a default value of 0 (zero).
I want to add a Post Validator condition to the transition 'Fail', if the user selects this option from the 'In Test' status step to increment the value of the 'Fail Count' field by 1 every time it passes through this workflow path. Field is Customfield_11505 (found via looking at URL from 'Configure' option for field).
I have no idea how to code HTML, so any help appreciated.
Thanks
Using JJupin, your script is:
customfield_11505 += 1;
HTH
Thanks Radu - I will give it a go and advise if it works.
Unfortunately, it failed ...
Unable to update custom field customfield_11505 - Failed Count in issue [RELDEMO-12].
As a thought - do I need to put this code inside some HTML - something similar to this ... (as I have said, I do not know HTML or scripting code, so this is a best guess)
<!-- @@Formula: customfield_11505 += 1; : 0) -->
Also, apologies, but I have no idea what 'JJupin' means
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't bother. It works (believe me), this is a plugin we created for easy scripting your JIRA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, using the 'Update Issue Custom Field' Post Validator option - in the 'Custom Field Value' - I type ... customfield_11505 +=1; - no other code around it and no other punctutation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe you're talking about another plugin (JIRA Suite Utilities plugin). In that case, refer to their help. Ours do something similar, but in a completely different way.
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.
Hi,
this is my solution:
import com.atlassian.core.util.DateUtils import com.atlassian.jira.ComponentManager import com.atlassian.jira.issue.history.ChangeItemBean def componentManager = ComponentManager.getInstance() def changeHistoryManager = componentManager.getChangeHistoryManager() def reopened = "1" def resolved = "5" def prev ="" def count = 0; changeHistoryManager.getChangeItemsForField (issue, "status").each {ChangeItemBean item -> def from = item.from; def to = item.to; if (to.equals(reopened) && resolved.equals(from)) { count++; } } // NOTE: doesn't show anything if less than 60 seconds return count as Double;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for quick response Tarun. Yes, I want to add a Post Condition, Update Issue Costom Field - Select 'Field Count' for 'Issue Custom Field' and then add the script in the 'Custom Field Value' that increments the value by 1. It is the script that I need to put in there that I don't know how to code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Doing it in a post-function might be better than trying to do it in HTML/JS.
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.