JIRA: How to Select the user and groups mapping 获得用户与用户组关联列表

Categories: Development Notes; Tagged with: ; @ May 28th, 2013 10:09

Requirement:

Export the users and group mapping list.

Solution:

Seems there’s no feature / plugins for this requirement. If you can access the database, then everything is easy:

SELECT  member.[ID]
      ,[membership_type]
      ,[group_type]
      ,[parent_name]
      ,[lower_parent_name]
      ,[child_name]
      ,[lower_child_name]
      ,member.[directory_id], jira_user.display_name
  FROM [jiradb].[jiraschema].[cwd_membership] member
left join [jiradb].[jiraschema].[cwd_user] jira_user
ON member.child_name = jira_user.user_name
order by parent_name

JIRA: Select Estimate and Actually Spent (Logged) Hours

Categories: Development Notes; Tagged with: ; @ May 9th, 2013 21:24

SELECT TOP 20
    CAST((ji.TIMESPENT – TIMEORIGINALESTIMATE)/3600  AS DECIMAL (6, 2)) AS [Diff(H)] ,
    CAST (ji.TIMEORIGINALESTIMATE/3600 AS DECIMAL (6,2)) AS [TIMEORIGINALESTIMATE(H)],
    CAST(ji.TIMESPENT/3600  AS DECIMAL (6, 2)) AS [TIMESPENT(H)],
    Project.pname AS [ProjectName],
    *
FROM jiraschema.jiraissue ji 
    LEFT JOIN jiraschema.project Project on ji.PROJECT = PROJECT.ID
ORDER BY (ji.TIMESPENT – TIMEORIGINALESTIMATE) desc

JIRA: How to get all issues related to a user 列出用户参与的所有条目

Categories: Development Notes; Tagged with: ; @ May 3rd, 2013 12:02

Requirement: Get all issues that the user has been involved in

for example, A created new issue, assigned to B, B resolved the issue and assign back to A, A closed the issue.
we need get this issue using ‘B’ as the filter.

Solution: Use “Assignee was” filter

Go to “Issue Navigator”, “Switch to advanced searching”,  use this query:

assignee was "userID"

JIRA: User have the permission but can not see ‘log work’ context menu

Categories: Development Notes; Tagged with: ; @ April 1st, 2013 19:58

Problem:  User have the permission, but unable to log work.

Cause & Solution:

Follow these steps:

    1. Ensure the user has the “Work on Issues” permission in the permission scheme. It’s possible that the user is not in the group, or not in the project role.
    2. Ensure that time tracking is enabled globally.
    3. Check whether the issue is ‘Closed’, or the workflow has put the issue in a state that is uneditable.
    4. Ensure that the Time Tracking field is visible (not hidden) on the Field Configuration.

      Note that this last procedure will allow editing of closed issues. If you wish to edit only this one issue, simply reopen the issue, add time tracking, and re-close.

      1. Choose the issue that is being affected by this problem (e.g. issues with Closed status).
      2. Navigate to Administration >> Global Settings >> Workflows and check for the Active workflow that the issue is using.
      3. Create a draft workflow since the current workflow is in an Active state.
      4. Click on View Properties for the affected issue status.
      5. Delete jira.issue.editable if it’s set to false.
      6. Add a new property with the same property key (jira.issue.editable) but set to true.
      7. Publish this workflow draft.

For my case, the project has it’s own field schema, and the ‘Time tracking’ filed was hided, after ‘show’ the ‘Time tracking’ filed,  user can log work.

 

For more details: https://confluence.atlassian.com/display/JIRAKB/Unable+to+Log+Work

JIRA Error: Unexpected token UNIQUE, requires COLLATION in statement [SET DATABASE UNIQUE])

Categories: Development Notes; Tagged with: ; @ March 14th, 2013 15:32

HTTP Status 500 – com.opensymphony.module.propertyset.PropertyImplementationException: Unable to esablish a connection with the database. (error in script file line: 1 Unexpected token UNIQUE, requires COLLATION in statement [SET DATABASE UNIQUE])


type Exception report

message com.opensymphony.module.propertyset.PropertyImplementationException: Unable to esablish a connection with the database. (error in script file line: 1 Unexpected token UNIQUE, requires COLLATION in statement [SET DATABASE UNIQUE])

description The server encountered an internal error (com.opensymphony.module.propertyset.PropertyImplementationException: Unable to esablish a connection with the database. (error in script file line: 1 Unexpected token UNIQUE, requires COLLATION in statement [SET DATABASE UNIQUE])) that prevented it from fulfilling this request.

I got this Error after I use DbVisualizer to connect to JIRA HSQL database.

the HSQL driver version I’m using in DbVis is 2.2.9, but the driver in my JIRA is 1.8.0.5.

Solution

Update the JIRA_HOME/lib hsdb driver and restart the JIRA server.

Link: http://stackoverflow.com/questions/12969109/error-in-script-file-line-1-unexpected-token-unique-requires-collation-in-stat

 

Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.