Hey everybody,
I am facing some problems to add watchers during the creation of a JIRA issue by using the IFTTT from confiforms (v3.4.3).
It was running properly in the past, but now it seems not working anymore. I tried to use different kind of values in the "Watchers" field, e.g. username, fullName, e-mail. Nothing works anymore. In the past it works with the username (kuengmi in my case).
Anyone else facing some problems?
Hi
You need to have the same usernames in your Jira and in your Confluence and a username is expected when adding watchers to the issue
Alex
Thanks for the fast answer Alex.
I know, but also if I add the usernames manually to the field watchers, like e.g. kuengmi it wont work.
Is this error also connected to the switch to AzureAD, like you work on SUPPORT-5083?
What I don't understand why is it working with Assignee/Reporter, if we using the username which are stored now in a cup.field. I would expect if we have problems by the change to AzureAD, also Assignee/Reporter should make problems.
The code below is still working...
If I try the following it wont work....
But where is the difference to Assignee/Reporter? Alle three fields refer to a user field, where the content where changed by the change to AzureAD, only watch don't work anymore if we refer to cup.field-7.
JIRA users:
Sorry for the bad explanation :D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A colleague tested it via REST API and it works, the problem is related to the IFTTT via confiForms...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How can this be related to ConfiForms only, if ConfiForms uses REST APIs to communicate with Jira!?
And things were working until the recent change with a switch to AzureAD (you have mentioned a private ticket we have in the queue SUPPORT-5083)
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not 100% sure, but it still works with Assignee and Reporter if we use the username (kuengmi).
As I follow you, you mentioned that it should still work if I entry e.g. kuengmi in the Watcher field within the IFTTT? This isn't working anymore, but I don't found an explanation.
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.
We don't get it running with IFTTT (create JIRA Task - Watcher field WHO) and we don't get it running with a IFTTT web request.
We just get it running with e.g. the network panel from Edge.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is exactly the REST API call we are using from ConfiForms
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I still not entirely sure about the change you have done and reported in SUPPORT-5083, but I suspect that ConfiForms now sends over the "new username" (with the email), and not what you try via the REST API
As your users seems to be now identifiable by the email, not usernames (as far as I understand the SUPPORT-5083)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know, and therefore I don't use the "Watcher" field dynamically anymore. In the past we used a MULTI-USER field, like e.g. [entry.watcher], to add watcher to a new generated case.
Because we changed the username structure, I was sure that it will not longer work with this syntax. The problem is now, that it's also not working if I entry a username manually to the "Wtacher" field from the IFTTT.
That makes no sense for me so far, because it would generate the similar REST API call we was testing via the networkpanel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try looking at the server logs to see what Jira now thinks about the attempt to add a watcher
There should be a warning message from ConfiForms starting as
Adding watcher
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Alex,
unfortunatly nothing is beeing logged neither in JIRA nor in Confluence while trying to add a watcher with hardcoded username via IFTTT macro :(
As you stated that the IFTTT internally exactly doeas the same - the question now is why this works via a REST call from client side but not from the IFTTT macro
Do you think it would be helpfull to increase the log levels for confiforms on the Confluence side?
Thanks, Marco
(2023-06-29: edited)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Alex Medved _ConfiForms_ ,
I have done some tests and have a question now. May you can help, I will try to explain...
May assumpion is, that the watcher field of the IFTTT have to be a multi-select User field, or at least you have to forward is as Array to Jira, I think it similar to this: watcher=[entry.FIELD.asArrayMultiUserPicker]
At the moment our array with AzureAD look like this: {"name":"michael.kueng@xxxx.de"}, {"name":"marco.leist@xxxx.de"}
Of course, this wont work because we user another user structure in Jira.
To get the right user name structure I have to use a virtual function: [entry.FIELD.asUserProfile.cup.field-7]
The first try from my side was: [entry.FIELD.asUserProfile.cup.field-7.asArrayMultiUserPicker], but it dont' work.
Anway, may you can answer my questions:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can chain the functions, of course.
"asArrayMultiUserPicker" does not need to have a "user field".
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have no idea why it's not working....it seems I can't chain the functions.
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="991d6dc6-d468-4d1e-bbc5-8d4e26ffb4c4" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">user</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="8f61403c-1db4-4d5d-8736-6d21b1ceee62" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="type">Embedded</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<p>
<ac:structured-macro ac:macro-id="1c88684b-e30b-4cd7-8964-226622d5e596" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">user</ac:parameter>
<ac:parameter ac:name="fieldLabel">User</ac:parameter>
<ac:parameter ac:name="type">multiuser</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="be0d297b-efa3-4ee9-a35b-3c719d889e2d" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">userID</ac:parameter>
<ac:parameter ac:name="fieldLabel">User ID</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="c8124c24-1bd3-4088-bc99-f8bf86bc5c16" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">username</ac:parameter>
<ac:parameter ac:name="fieldLabel">Username by cup.field-7</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="4d3cdfb7-318a-4ae1-a56d-f2912ddef60d" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">array1</ac:parameter>
<ac:parameter ac:name="fieldLabel">Array UserIDs</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="53abcda8-ebb9-4880-bf50-e63c252f0aed" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">array2</ac:parameter>
<ac:parameter ac:name="fieldLabel">Array of cup.field-7 content</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="933f4266-42f7-441d-bcb0-fab302bd7a3a" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">hasChanged(user):true</ac:parameter>
<ac:parameter ac:name="values">userID=[entry.user]</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">user</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="3ef5b040-dbe0-41fe-ab60-a5f7bc7e7630" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">hasChanged(user):true</ac:parameter>
<ac:parameter ac:name="values">username=[entry.user.asUserProfile.cup.field-7]</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">user</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="0f2293ae-77f2-4a5c-9fe8-86683d695f5e" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">hasChanged(user):true</ac:parameter>
<ac:parameter ac:name="values">array1=[entry.user.asArrayMultiUserPicker]</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">user</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="38a4639c-b25a-43c0-83a5-396d71a9b6e5" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">hasChanged(user):true</ac:parameter>
<ac:parameter ac:name="values">array2=[entry.user.asUserProfile.cup.field-7.asArrayMultiUserPicker]</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">user</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="9ccc3787-5e38-45fd-9dce-349803615ad8" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">user:*</ac:parameter>
<ac:parameter ac:name="values">user=[entry._user]</ac:parameter>
<ac:parameter ac:name="action">Set value if empty</ac:parameter>
<ac:parameter ac:name="actionFieldName">user</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, it only works with a Multi-Select field, on a normal text field it won't work. You have tried my example?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Alex,
a short addition to better understand Michaels last post:
We use the app linchpin user profiles to realize additional custom user profile fields like "location" or "expertise". After we changes the usernames in confluences from SAM Account Name to User Principal name, we mapped the old SAM Account Name to the custom user profile field ".cup.field-7". This way, we only need to adapt our IFTTT macros for creating JIRA Issues a litte bit, w.g. from
assignee":{ "name":"[entry.assignee]"
(now e.g. marco.leist@sick.de)
to
assignee
":{ "
name
":"
[entry.assignee.asUserProfile.cup.field-
7
]"
(now returns e.g. leistma@sick.de - identical to user in JIRA)
So the point is that with single user fields like "assignee", the chaining with the virtual function .asUserProfile.cup.field-
7
works very well - but not combined with the virtual function ".asArrayMultiUserPicker" which is required for JIRA fields that can contain multiple users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another short update:
We were now successful by replacing
"customfield_10200": [ [entry.affectedusers.asArrayMultiUserPicker] ],
by
"customfield_10200": [ [entry.affectedusers.asUsers.transform(asUserProfile.cup.field-7).asArrayMultiUserPicker] ],
within JSON creation code (where "affectedusers" is the name of a confiform multi user field).
Unfortunately, it don't works with the watcher field.
We would expect that if we could set the watchers within the JSON code, it would work as well, but we haven't found a solution for this so far.
I could imagine that the problems with setting the watcher via JSON are related to https://jira.atlassian.com/browse/JRASERVER-29304?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We dont validate the input as JSON on ConfiForms side and send it as a string as documented in the APIs
Besides, you are saying that direct call to Jira passing the string works for you. Could you update to most recent version of ConfiForms to see if that works any better for you - we have removed the validation for the user (to exist) when collecting "watchers" (obviously, with your changes to new usernames format this was the check that started to fail - as you have usernames in one format, but want to pass to Jira "something else")
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Alex Medved _ConfiForms_ ,
Heureka! Without the validation the following string within the watcher field is working for use to add multiple watchers again -> [entry.FIELDNAME.transform(asUserProfile.cup.field-7).asList]
Thanks a lot for your fast and always friendly support! I really appreciate that.
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, why it was working (before for you, and others) and why ConfiForms has been checking the usernames to EXIST before sending them to Jira is because of the app link configuration - where the same user names are used in Jira and Confluence... which is now not the case for you (your configurations)
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.