Get input from user in workflow?

Hi,

In a workflow, I'd like to prompt the user to add a comment, assign it to a variable and use it in further processing.

Is there a simple way to do something like:

    var userComment = inputBox("Please add your thoughts...");

I can see that I can create a form outside and use it in the workflow but I was looking for a simpler option! :)
6 comments
Comment actions Permalink
You can use the standard 'new comment' input in the workflow:
rule comment 
 
when comments.added.isNotEmpty { 
  var addedComment = comments.added.last; 
}
prettyPrint();
0
Comment actions Permalink
Thanks Dmitry.  

Unfortunately, I'm looking to pop up a prompt that will allow the user to enter text.  It's an enhancement to time tracking that will allow them to provide details of the work done rather than put in the default "The work item automatically..." text.

Something equivalent to the old VB InputBox perhaps (http://msdn.microsoft.com/en-US/library/6z0ak68w(v=vs.80).aspx)?
0
Comment actions Permalink
I guess the opened 'Command window' would be enough for your purpose, please look at the JT-10337 and related issues.
0
Comment actions Permalink
No, not really.  I need to:

1. Prompt the user to provide some information
2. Let the user type into a box of some sort.
3. Capture it in a variable
4. Log it against the time tracking tab (not the comment).

I can do step 4 easily using:  

  issue.applyCommand("add work Today " + MyText);

But capturing from the user directly (nothing to do with the issues comments) seems hard.
1
Comment actions Permalink

Is this possible in 2018? I have very similar scenario, I need to use user input to process it. I want to use the user input (multiple lines, each line contains summary of issue) to bulk add sub issues. Or is there another way to do that?

0
Comment actions Permalink

Hello,

Unfortunately it is not possible for now. Here is a request to allow some multiline fields: https://youtrack.jetbrains.com/issue/JT-43095. This will allow to have the field to collect user input. 

I have also filed a feature to request and proceed user input: https://youtrack.jetbrains.com/issue/JT-46211. Please feel free to vote/comment it to increase its priority.

0

Please sign in to leave a comment.