Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal error trying to add a watcher

Ian Brunker September 26, 2018

Hi

I am trying to add a watcher who is a portal only customer and not a user.

Permissions for Browse Project are 

Project role: Service Desk Customers; atlassian-addons-project-access

Application access: Any logged in user

Trying to add the watcher I got the following:

com.querydsl.core.QueryException: Caught PSQLException for insert into "public"."userassociation" ("association_type", "source_name", "sink_node_entity", "sink_node_id")
values (?, ?, ?, ?)
com.querydsl.core.QueryException: Caught PSQLException for insert into "public"."userassociation" ("association_type", "source_name", "sink_node_entity", "sink_node_id")
values (?, ?, ?, ?)
at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50)
at com.querydsl.sql.Configuration.translate(Configuration.java:508)
at com.querydsl.sql.dml.AbstractSQLInsertClause.execute(AbstractSQLInsertClause.java:436)
at com.atlassian.jira.association.UserAssociationStoreImpl.lambda$createAssociation$1(UserAssociationStoreImpl.java:60)
at com.atlassian.jira.database.DefaultQueryDslAccessor.lambda$executeQuery$0(DefaultQueryDslAccessor.java:55)
at com.atlassian.jira.database.DatabaseAccessorImpl.lambda$runInTransaction$0(DatabaseAccessorImpl.java:71)
at com.atlassian.jira.database.DatabaseAccessorImpl.executeQuery(DatabaseAccessorImpl.java:40)
at com.atlassian.jira.database.DatabaseAccessorImpl.runInTransaction(DatabaseAccessorImpl.java:66)
at com.atlassian.jira.database.DefaultQueryDslAccessor.executeQuery(DefaultQueryDslAccessor.java:54)
at com.atlassian.jira.association.UserAssociationStoreImpl.createAssociation(UserAssociationStoreImpl.java:54)
at com.atlassian.jira.issue.watchers.DefaultWatcherManager.updateWatch(DefaultWatcherManager.java:217)
at com.atlassian.jira.issue.watchers.DefaultWatcherManager.startWatching(DefaultWatcherManager.java:97)
at com.atlassian.jira.issue.watchers.DefaultWatcherManager.startWatching(DefaultWatcherManager.java:88)
at com.atlassian.jira.web.action.issue.ManageWatchers.doStartWatchers(ManageWatchers.java:175)
at sun.reflect.GeneratedMethodAccessor9609.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
at webwork.action.ActionSupport.invokeCommand(ActionSupport.java:438)
at webwork.action.ActionSupport.execute(ActionSupport.java:157)
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:66)
at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39)
at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31)

 

Any ideas?

Thanks

2 answers

1 accepted

1 vote
Answer accepted
Alexey Matveev
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.
September 27, 2018

Hello,

Could you check that your jira database user can create rows in the public"."userassociation? Does this user have correct permissions and there is available space in the database.

Ian Brunker September 27, 2018

Sorry, I'm not sure how to check these points. I'm a site admin with absolutely minimal experience administering Jira. Our normal site admin is away and I was thrown in as I was an RDMS developer so apparently I know how to administer any system.

I can add a user as a watcher, but not a portal only customer as a watcher.

We are using the cloud version so I would hope that DB space is not an issue.

I have added the user as a standard portal only customer via the system functionality and it looks OK on the surface. I was surprised when I got the Internal Error and stack trace and thought it looked like more of an issue than simple lack of user experience.

 

Thanks for your help.

Alexey Matveev
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.
September 27, 2018

Ah, I see.

You can not add a portal custom as a watcher because a portal customer does not have a Jira license. You should add a portal customer as a participant or you should create organizations.

Ian Brunker September 27, 2018

Thanks. That explains a lot. 

Alexey Matveev
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.
September 27, 2018

You are welcome! If you feel like my answer helped you, kindly mark my answer as accepted.

0 votes
Adrian Wedd
Contributor
October 2, 2018

This should be possible, given Jira Service Desk customers can be made reporters, they should be able to be made watchers on Jira Software issues.

According to https://jira.atlassian.com/browse/JRACLOUD-59758

  1. In order to be added as a watcher on an issue, a user must have "Browse Project" permission to this project.
  2. In JIRA Service Desk projects, by default, customers who are logged in do not have Browse Project permission. They can only view issues via the customer portal.
  3. By default in JIRA Software projects, Browse Project permssion is granted to "Any logged in user". Since JIRA Service Desk customers don't have access to any JIRA applications, they can be "logged in" but unable to actually view any issues (outside of the customer portal). However, the JIRA Software permission scheme treats them as having Browse Project permission and therefore they can be added as watchers.
  4. This problem can be easily addressed by changing the permission scheme for JIRA Software projects for the Browse Projects permission from "Application role: any logged in user" to "Application role: JIRA Software". This will ensure that only users who have access to JIRA Software can be added as watchers.

Unless this changed (again). Raised with Atlassian for clarification.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events