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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,929 views 19 22
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