Issue collector not working for anonymous user: fields are not displayed

Florent Jochaud December 15, 2013

Hi,

We have an on demand instance of Jira and we'd like to use the issue collector for our website contact form.

I created a collector linked to a special issue. It works if a user is logged in (independantly of the "Match Reporter" settings) but if I try without being logged in, i get the following errors:

  • Oops! Something went wrong... on the form page (after i entered my name and email address, beore the issue ofrm is visible)
  • Required fields not present in collector... in the "logs" of the connector list page.

I tried:

  • Changing the rights to allow anonymous users to create issues and to change the reporter
  • changing the "reporter" field to make it optional
  • using different, more standard issue types

All without success.

After more investigation it seems that it's the form generation which is failing: all my fields are not displayed, only name and email are visible. So when I submit the form i just get missing mandatory field (probably the issue name).

Also it's an on demand instance so there is no way to check more logs...

What is the source of this error? what can we change? How comes all my selected fields are not displayed?

thanks

2 answers

1 vote
Alexej Geldt
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.
December 16, 2013

I used to have similar problems with integration tests which were testing some custom fields.

When i start the tests from UI after being logged in, they run as expected. But when I try to run them from console using atlas-integration-test script, they fail because they are not getting the values from some custom fields.

I assume that, some of the internaly used service managers requires an authenticated user in context, but instead of throwing an exception it preferes doing nothing.

For me, it helped to authenticate a user programmaticaly prior to running the tests. If security is no concern to your application and you want to allow anonymous access to your issues anyway, this might help you too.

Try to log in programmatically when there is no user on context. Something like

authContext = ComponentAccessor.getJiraAuthenticationContext();
		if(!authContext.isLoggedInUser()) {
			authContext.setLoggedInUser(ComponentAccessor.getUserManager().getUser("admin"));
		}

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2013

I wouldn't worry about issue types, I think it's the reporter field. You've got anonymous-create and optional reporter, but there's a third permission for "change reporter" in the permission scheme. I suspect you need to allow that to "anonymous" as well as "create"

Florent Jochaud December 15, 2013

Thanks for the suggestions, I tried and it's not the permissions. but trying with the standard screen also showed me the error is different, it's just that all my field are actually not displayed on the form so when i want to submit, i do miss some mandatory value.

I'm updating my post

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2013

Ah, I wasn't far off then!

Sorry I missed "make sure field is on screen" though. I didn't thnk of that.

Florent Jochaud December 15, 2013

yeah, sorry, I had the impression it was a 2 step process and was failing in the middle. So any idea why my fields don't show up?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2013

Start by trying to create an issue in Jira's UI first - do you get all the fields you need in there?

Then log out and try the same anonymously - still all the right fields?

Florent Jochaud December 15, 2013

so:

just as more details: I got a few custom field so i have a custom screen for this issue type.

  • in jira "create issue" no problem, I see all my fields
  • using the issue collector if i'm logged in: no problem either and i see all my fields
  • using the issue collector as anonymous: it doesn't work
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2013

Good, but what abou the last test? What do you get if you raise an issue in the UI while you are not logged in?

Florent Jochaud December 16, 2013

this i cannot do, our jira is not in free access, which is why we want to use the collector.

Florent Jochaud December 16, 2013

I thought this was the exact aim of the issue collector?

Besides, the standard issue collector form is working and anonymous users can create issues with it. It's just when I try to create my own form that it doesn't work.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2013

Well, that's the answer then. The collector has to respect the permissions and security in Jira. You've told Jira "no anonymous creation of issues", so the collector can't do it either.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2013

Sorry, I realise that was written totally incorrectly. Rather than edit my post and confuse the thread, I'll try it again

The issue collector does not require anonymous access. I wanted to check how that worked, and that looks fine to me.

The next test I had in mind was to log into the UI as the person you have set as the default reporter for the issue collector - not yourself, but the reporter named in the isssue collector config. Specficially, does that login get offered the ability to change reporter?

Florent Jochaud December 16, 2013

I see,

so, to answer your question, yes that login is an admin so he has all the rights.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2013

Administration rights are not the same as project rights.

Can you explicitly check that this user sees the reporter field and can change it when manually creating an issue?

Also, can you try regenerating the issue collector javascript and check that it's the same in the application you're adding it to?

Florent Jochaud December 16, 2013

after more test, it works on internet explorer and chrome but not firefox and i was making all my test on firefox...

so i think i can stop looking here and start looking on the list of bugs...

Thanks for your help!!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2013

I'm really sorry it took so long to get to something resembling an answer!

Suggest an answer

Log in or Sign up to answer