Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Add watcher to a JIRA ticket from confiforms

Dear all,

I'm creating a ticket from a confluence form using confiforms and everything works as expected until I try to add watchers to the JIRA ticket.
My code looks like

{ "fields": 
{ "project": {"key": "CBCF"},
"summary": "$summary",
"assignee": {"name":""},
"description": "Please go to www and $description",
"issuetype": {"name": "Task"},
"labels": ["CBCFBuckets","[entry.CBCFTeam.escapeJSON]"],
"watchers": ["watcher1","watcher2","watcher3" ],
}
}

 the error I get when trying to create the ticket is:

com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, {"errorMessages":[],"errors":{"watchers":"Field 'watchers' cannot be set. It is not on the appropriate screen, or unknown."}}


The only refence to adding watcher I've found is this in here where it says:

You can set additional watches to the issue what will be created, but in this tutorial we omit this step (see IFTTT macro parameter "watchers"). Could be set dynamically, referencing entry fields or record owner or modifier.

but when I try to do it in the ConfiForms IFTTT Integration Rules, under watchers, it does not add them in the JIRA ticket.

Could anyone help me, please?

2 answers

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 23, 2023

Hi @Arnau Bria 

Watchers could not be added as part of the issue creation. As technically those are added via a different API call

These are to be set in the macro parameters

Screenshot 2023-10-23 at 16.22.27.png

Alex

Hi @Alex Medved _ConfiForms_ and thanks for your answer.

I already did it like this, this is what I meant by

 

but when I try to do it in the ConfiForms IFTTT Integration Rules, under watchers, it does not add them in the JIRA ticket.

 

the problem is that even adding them there like

["watcher1","watcher2","watcher3" ]

or
"watcher1","watcher2","watcher3"

they don't end up as watchers in the JIRA  ticket.
I'm using user's email as those are jira user names.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 23, 2023

watcher1,watcher2,watcher3

Each must be a username that your Jira recognizes and accepts

Ok, then I guess (and hope) that this is the problem. I've been told that email is what JIRA users as usernames, but seems like it is not the case.

Thanks

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 23, 2023

You can verify that yourself, checking through the APIs - https://docs.atlassian.com/ConfluenceServer/rest/8.6.0/#api/user-getUser

Alex

Thanks!
Did it and the username in both JIRA/Confluence are the email address... any other reason why the watchers are not added to the ticket?

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 24, 2023

Hard to tell... impossible to debug something like this remotely

Try adding the watcher yourself, via API - https://docs.atlassian.com/software/jira/docs/api/REST/9.11.0/#api/2/issue-addWatcher

(postman or curl)

Does it work?

API worked. I'm going to do the whole thing from API instead of confluence and confiforms.
thanks for your help.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 25, 2023

API can also be invoked from ConfiForms.

But are you saying that setting the watchers parameter to the correct value representing a user does not work when called from the ConfiForms IFTTT macro?

yes, but as I realized I have access to the API I prefer to create the JIRA from my applications insetad of sending people to confluence.

But yes, adding watchers in ConfiForms IFTTT macrodoes not work as expected.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 25, 2023

Could we take this via our support channel? I would love to understand what does not work for you in ConfiForms and how is that watchers parameter is configured

I'm not the atlassian responsible here in my compnay. I'd have to consult.

I have my conversation to get 4 years pectices to be help Google patner

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events