Hi
I would like to add a scripted custom field with dropdown options Yes & No. I want the scripted field to check for attachment(s) in an issue and set custom field option as yes if there are attachments, else No.
What is the best way? and I have no experience in groovy and accessing attachments.
Any help is appreciated, Thanks
Scripted fields do not have options, they calculate something and display it to the users.
Your desired behaviour is unclear to me, could you describe what the users will see (and do) without worrying about any part of the "how"? What is the question you are trying to answer for your users?
Hi @Nic Brough -Adaptavist- As of now in Jira issue search navigator we don't see attachments and while JQL subscription it is hard for users to understand if there is an attachment to the issue or not. To solve this I was thinking to have a scripted filed to say YES or NO if there are any attachments or not and add this field to issue navigator and to JQL subscription
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- Reason is, the set of users who receives email subscription will not have Jira access per business logic, hence a simple subscription which talks about tickets and say whether there is an attachment or not
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, I see.
I would go one step further than yes/no, and give your people even more information.
Try setting up a scripted field that
return issue.getAttachments().size()
This will put the count of attachments in front of your people, so they can sort by it and your "yes" could be searched for with "number of attachments" > 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.