As my company's Confluence Site Administrator, I'd like to be able to access a Confluence Calendar which has been restricted from editing if need be. Currently navigating through the Confluence Administration (i.e. site settings) area (including the Team Calendars section within), I cannot find a way to do this; documentation that may be out there explaining how to do this seemingly hard to find also.
I don't even see the option to request access from whoever the creator of the Calendar may be...
Can someone please help me do this, or can this feature be incorporated in future versions soon?
Thanks regardless.
Are you suggesting concatenating ALL comments for a single issue into a single string to be placed in a single cell for a given issue?
That could quickly exceed the size limit from just about any system that you might use to read that cell.
But if you really need to, you could try something like this:
import com.atlassian.jira.bc.issue.search.SearchService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.datetime.DateTimeFormatterFactory
import com.atlassian.jira.datetime.DateTimeStyle
import com.atlassian.jira.issue.search.SearchException
import com.atlassian.jira.web.bean.PagerFilter
import org.apache.log4j.Level
// The JQL query you want to search with
final jqlSearch = "project = UBT AND issuetype = Task"
// Some components
def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def searchService = ComponentAccessor.getComponentOfType(SearchService)
def commentManager = ComponentAccessor.commentManager
def jiraDateFormatter = ComponentAccessor.getComponent(DateTimeFormatterFactory).formatter().withStyle(DateTimeStyle.DATE_TIME_PICKER)
// Parse the query
def parseResult = searchService.parseQuery(user, jqlSearch)
if (!parseResult.valid) {
log.error('Invalid query')
return null
}
try {
// Perform the query to get the issues
def results = searchService.search(user, parseResult.query, PagerFilter.unlimitedFilter)
def issues = results.results
FileWriter attFds = new FileWriter("/apps/dev/jira-home/log/issues.csv")
attFds.write('Key,Summary,Reporter,Assingee,Created,Updated,Comments\r\n')
issues.each { issue ->
def comments = commentManager.getComments(issue)
def combinedComments = comments.collect { comment ->
"$comment.authorApplicationUser.displayName ($comment.authorApplicationUser.name) - ${jiraDateFormatter.format(comment.created)}:\n$comment.body"
}.join('\r\n\r\n')
attFds.write(issue.key + ',')
attFds.write(/"$issue.summary",/)
attFds.write(/"$issue.reporter.name",/)
attFds.write(/"$issue.assignee.name",/)
attFds.write(/"${jiraDateFormatter.format(issue.created)}",/)
attFds.write(/"${jiraDateFormatter.format(issue.updated)}",/)
attFds.write(/"${combinedComments.replaceAll('"', '""')}"/)
attFds.write('\r\n')
}
attFds.close()
} catch (SearchException e) {
e.printStackTrace()
null
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.