Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search and missing project manager #34

Open
HaakonME opened this issue Jan 11, 2018 · 1 comment
Open

Search and missing project manager #34

HaakonME opened this issue Jan 11, 2018 · 1 comment

Comments

@HaakonME
Copy link

Hi, Marcus! Thanks for providing this plugin!

I added the custom fields as per your description, and then it worked as described. I have two minor issues I hope you can help me with.

Adding any character in the filter box of the three first columns (Parent/Project/Project Manager) makes the list below disappear, rather than filter the list. The last four columns' filter boxes work as expected.

Many projects are listed as having no project manager, even though a project manager is defined. Some projects DO show a project manager. I have been unable to find out what is required beyond setting the portfolio and project manager field in the projects settings.

Cheers,
Haakon

Unfortunately, I do not speak Portuguese, below is the above text translated with Google translate:

Oi, Marcus! Obrigado por fornecer este plugin!

Eu adicionei os campos personalizados conforme a sua descrição, e então funcionou como descrito. Tenho dois problemas menores, espero que você possa me ajudar.

Adicionando qualquer caractere na caixa de filtro das três primeiras colunas (Parent / Project / Project Manager), a lista abaixo desaparece, em vez de filtrar a lista. As caixas de filtro das últimas quatro colunas funcionam como esperado.

Muitos projetos estão listados como não tendo nenhum gerente de projeto, mesmo que um gerente de projeto seja definido. Alguns projetos DO mostram um gerente de projeto. Não consegui descobrir o que é necessário além de definir o campo do portfólio e do gerenciador de projetos nas configurações dos projetos.

Felicidades,
Haakon

@HaakonME
Copy link
Author

Hello again, Marcus. There seems to be further trouble with getting the correct responsible. A new user added to Redmine suddenly is set as responsible on those projects which showed a project manager, but this user is not a member of any projects yet.

def project_responsible(project_id)

      sql = "SELECT (case when firstname is null then 'N/A' ELSE firstname END) as assigned_to FROM users WHERE CAST(id AS char ) IN     (SELECT (CASE WHEN cv.value IS NULL OR cv.value = '' THEN '0' ELSE cv.value END) AS assigned_to FROM projects p LEFT OUTER JOIN custom_values cv on(cv.customized_id = p.id) WHERE cv.customized_type = 'Project' AND cv.custom_field_id = #{portfolio_management_manager_attribute::id} and p.id = #{project_id})"
              result ="N/A"
              responsibles = ActiveRecord::Base.connection.select_all(sql)
      responsibles.each do |responsible|
          result = responsible['assigned_to']
      end
      result
    end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant