Create a user macro that adds a label(s) to a page

I know this has been asked several times before, but I was wondering if anyone has been able to create a user macro that can add a label to a page.

I am working with some work request pages, which are predefined templates. One of those pages is designed to identify product impacts. So, what I want to do is provide users with several checkboxes that represent the product pages, which maintain all documentation for a given product (we have multiple products).

If the user checks the box, the product label is applied to the product impacts page. If I could somehow apply the work request label to the product page also, that would be really cool, but I'm not sure if that's possible.

I'm a new Confluence user, so please be gentle.

Thank you!

2 answers

1 accepted

I tried that and while it provides a full list of labels, it doesn't support what I need to do. I may be a ble to take the actual attach label piece from it, but that still leaves the other part of creating the checkbox, where if selected the label is attached and if deselected, the label is removed. I'm a very inexperienced user so, I apologize for my ignorance.

Another issue I'm having is keeping the checkboxes checked. Right now, when I leave the page, everything resets. Any suggestions?

## @noparams

<script>
function check()
{
document.getElementById("check1").checked=true
}
function uncheck()
{
document.getElementById("check1").checked=false
}
</script>
<table>
<tbody>
<tr>
<td colspan="7"><form>
<input type="checkbox" id="check1">HWTX
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">HWMB
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">HCFG
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">IBBA
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">MIDR
</form></td>
</tr>
<tr><td colspan="7"><form>
<input type="checkbox" id="check1">HWPS
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">EWTX
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">EFDE
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">DOCO
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">PREA
</form></td>
</tr>
<tr>
<td colspan="7"><form>
<input type="checkbox" id="check1">FRNT
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">HREP
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">SYSA
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">JAVP
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">T3RT
</form></td>
</tr>
</tbody>
</table>

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

52 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you