Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,550
Community Members
 
Community Events
165
Community Groups

Confiforms: voting control not working, not counting votes.

Hi

I need to get user feedback (confiform registration), show the list of topics registered (confiforms tableview) and allow users to vote for the topics we should discuss in a retrospective (confiform field type voting control).  I followed this tut: Quickly capturing employee votes on things that matter - Vertuna WIKI - ConfiForms)

 

After clicking vote on an item, the voting count doesn't increase it remains 0 no matter what, the vote button doesn't change. 

I tested with my user, another colleague user. So I assume the problem is not logged user. I inserted the field "votes.asCounts" it doesn't count anything. 

I don't know what might be happening with something so simple as setting a voting control!?

Source code here:

<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">choice1</ac:parameter>
<ac:parameter ac:name="fieldLabel">Choice 1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="0221e7b7-2d3e-4791-9e44-1ed5a8bf314e" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes</ac:parameter>
<ac:parameter ac:name="fieldLabel">Vote!</ac:parameter>
<ac:parameter ac:name="values">Vote for me!</ac:parameter>
<ac:parameter ac:name="extras">Remove my vote</ac:parameter>
<ac:parameter ac:name="type">voting</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="34586145-846a-47a7-b52a-b0a13ad6eb78" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes.asCounts</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<br/>
<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro> 

1 answer

1 accepted

Hi

There is no such function as "asCounts", but there is a function called "asCount" that you can use

So, the expression should be votes.asCount

And the ConfiForms Field needs to be used from within view macro, ie in TableView in current case

Please note that voting control works only for authenticated users

Alex

Hey Alex!

Thanks for your kind help. I corrected the typo, it doesn't work ...

>When I click on vote button it doesn't count the vote. I am logged in. 

vote error.png

Here the source code:

 

<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">choice1</ac:parameter>
<ac:parameter ac:name="fieldLabel">Choice 1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="5f53e847-762f-4919-b9bb-051799125597" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes</ac:parameter>
<ac:parameter ac:name="fieldLabel">Vote!</ac:parameter>
<ac:parameter ac:name="values">Vote for me!</ac:parameter>
<ac:parameter ac:name="extras">Remove my vote</ac:parameter>
<ac:parameter ac:name="type">voting</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="a1788284-ffe8-42ef-a3b4-0ba9056e0b6a" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes.asCount</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>

Hi Alex!

 

Thanks for your kind help. After correcting the typo "as.Counts" it is still not working. The vote button doesn't change the counter.  (I am logged in)

vote error.png

 

logged user.png

 

Here the source code:

<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">choice1</ac:parameter>
<ac:parameter ac:name="fieldLabel">Choice 1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="5f53e847-762f-4919-b9bb-051799125597" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes</ac:parameter>
<ac:parameter ac:name="fieldLabel">Vote!</ac:parameter>
<ac:parameter ac:name="values">Vote for me!</ac:parameter>
<ac:parameter ac:name="extras">Remove my vote</ac:parameter>
<ac:parameter ac:name="type">voting</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="a1788284-ffe8-42ef-a3b4-0ba9056e0b6a" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes.asCount</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>

AND

when I put the field "votes.asCount" inside tableview, the vote button is gone. 

 

ascount in view.png

Here source code for that:

<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">choice1</ac:parameter>
<ac:parameter ac:name="fieldLabel">Choice 1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="5f53e847-762f-4919-b9bb-051799125597" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes</ac:parameter>
<ac:parameter ac:name="fieldLabel">Vote!</ac:parameter>
<ac:parameter ac:name="values">Vote for me!</ac:parameter>
<ac:parameter ac:name="extras">Remove my vote</ac:parameter>
<ac:parameter ac:name="type">voting</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="a1788284-ffe8-42ef-a3b4-0ba9056e0b6a" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes.asCount</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>

Hey Alex!

Thanks again for your support!. After you sharing the screencast with my code on your confluence environment and me trying the same on my company confluence setup, I conclude it can onle be some sysadmin setup that prevents me to use the confiform voting control. 

I corrected what you suggested, and use exactly the same macros in the order you suggested in the video, AND it doesn't work...

 

test vote me.pngedit confiform voting control.png

 

 

Here source code:

<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">choice1</ac:parameter>
<ac:parameter ac:name="fieldLabel">Choice 1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="5f53e847-762f-4919-b9bb-051799125597" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes</ac:parameter>
<ac:parameter ac:name="fieldLabel">Vote!</ac:parameter>
<ac:parameter ac:name="values">Vote for me!</ac:parameter>
<ac:parameter ac:name="extras">Remove my vote</ac:parameter>
<ac:parameter ac:name="type">voting</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">voting</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="63c80c14-44e0-4ac0-98b3-4414b156b79f" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">choice1</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="262ae748-8dd2-457f-869e-c42b25116226" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">votes</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

371 views 2 11
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you