Comments
-
I'll take a risk here and disagree with Nic. Templates are precisely for formatting the value returned by the script field code for display to use the user. You can convert to hours using code as shown below. Caution: You must use the number range indexer for the field, otherwise ScriptRunner will convert the return value…
-
This is a jira issue... in fact this q has already been asked: https://answers.atlassian.com/questions/40838/how-to-avoid-invalidinputexception-stacktrace-in-log-using-custom-validators
-
@Radu... it could be any member of the massive development team. But when I found out who, they'll be sorry....
-
"throw new InvalidInputException" works fine for me fron file and inline script. In 3.0.5: invalidInputException = new InvalidInputException will also work (from both).
-
What version of the plugin are you using? I think I may have broken that backwards compatibility in one of the most recent releases.
-
Does using: throw new InvalidInputException("Validation failure") work?
-
Could just add a screenshot. It really depends if you are using "custom validator" or "simple scripted validator". They work differently. "false" is fine for the latter. For the former, try finishing your script with: throw new InvalidInputException("Validation failure") what version of SR are you using?
-
Make sure the workflow is published, and associated with the project/issue type you are testing with.
-
You can check how many files are opened with lsof, and tweak your ulimit accordingly.
-
I'd ask a separate question with specifics... eg what screens, what plugins, how many issues. If you have experience inhouse try load-testing and profiling... http://blogs.onresolve.com/?p=95 plus loads of info on this subject elsewhere.
-
Totally agree, with the tacit understanding that that's not always possible ;-)
-
Also see * http://confluence.atlassian.com/display/DOC/Performance+Tuning * http://confluence.atlassian.com/display/JIRAKB/JIRA+Performance+Tuning
-
The value displayed on the issue will update immediately you change the code. But, and this only applies if you use an indexer, the indexed value will not. It is only updated when the issue is indexed. A global reindex is the easy option. Another option is to use the method Henning suggested below, which will probably be…
-
Strange, I will test that. Don't forget you will need to reindex all issues affected if you change the script though.
-
There's a difference between an empty string and null. If you return null, it will work properly. I'm not quite sure what you mean by a "null string". You should change it to: return pfNames.join(", ") ?: null
-
Just a note - if you don't use the correct tags, ie the one for this plugin, it's unlikely that all the right people are going to see your question.
-
+1 to what Steven said. If you looking at calculating a period between two days in working days, there are quite a few examples for that on stackoverflow.
-
you don't need to include (Timestamp)
-
It's really not the right thing to do, but you can use a listener to update another field. Do *not* do it from the script field code.It would be better to have EasyBI understand the formatting of a date.
-
> Thanks, But if i use above template, JIRA date query is not workingHow????? is it not working?
-
custom field -> edit -> searcher
-
> Thanks, But if i use above template, JIRA date query is not workingwhat indexer is in use?
-
I think what you want to do is store a date and time but display only the date. Even the JIRA date custom field stores a date time IIRC, but the time is set to midnight, which you can do yourself if you want with with Date#clearTime(). A custom template that renders the date only could be: #if ($value)…
-
Duplicate of https://answers.atlassian.com/questions/11463685.
-
This is a duplicate of https://answers.atlassian.com/questions/11463685/bug-with-script-runner-on-field-comment - can you please respond to the question I asked you there.
-
Also browser please.
-
Could you describe a bit more about what you mean by a "hidden"?
-
Also see https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Changedashboardorfilterownership . Given a dashboard, it will also change ownership of any filters that are used in that dashboard, if they are not visible to the person you are updating it to. Can multiselect filters and…
-
no need to stick to a single line of code, write as much as you need to to make it clear
-
but it's just a convenience... if you don't want it then you should cfm to get the custom field by ID.