A manual trigger has been created to generate a new work item. Before work item is created, the trigger requests user input to state if the work item is of Type A or B and creates a variable for that answer which is used as a smartvalue in the newly-created work item description.
The difficulty is that depending on the answer A or B, other work item fields need to be set differently. Using an if/else does not work, as the variable/smartvalue does not appear to allow me to set fields based on whichever answer was picked - unless I am missing something barn-door obvious.
Which is what I am hoping you lovely denizens of the forums might spot right out of the gate (and I will feel suitably ridiculous for failing to spot)
The answer, somewhat ridiculously, was to say that response "CONTAINS" A or B on the Else/IF statements - "Equals" wouldn't let it work. I have no idea why.
Greetings,
assuming im not overlooking something, this should be easy enough.
The following automation does log different stuff based on the option chosen in a userinput (short text) on a manually triggered automation. You'd not use the log action of course, but the edit action to then set field values according to whatever they need to be set to, given the chosen option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Because @Michael Wohlgemuth expected and dealt with all possible user inputs (also false ones), I voted for this solution. Well done, Michael!
Kind regards,
Dick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, this did not work out as hoped. Irrespective of the response chosen, the work item generated was only that which had been created under the final ELSE statement, as though neither option had been selected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks both - I did think of using this sort of thing, but then completely lost my mind when it was talking about comparing two values and couldn't get it to offer the options in the dropdown. Will try it and see what happens
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.
Okay, so I thought this would absolutely HAVE to work, but instead, with this set up of two If/Else options for responses A and B, the outcome was that no ticket was created.
If I changed the second option to Else, then when it generated the work item, it only ever generated the second option
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.