Need a currentProject() function in filter syntax

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Need a currentProject() function in filter syntax

forums-5
Hi,

I don't find how to specify the current project in filters (in advanced edition mode). I thought I could find a currentProject() function, like currentUser(), but it does not seem to exist.

Without that, how do you define a common filter which applies on each project, and which shows only issues for current project?

Thanks

Sylvain
--
Post by syllant - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=50770
_______________________________________________
Jira-user mailing list
[hidden email]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user
Reply | Threaded
Open this post in threaded view
|

Re: Need a currentProject() function in filter syntax

forums-5
I'm not sure that makes any sense - what would you expect it to use as the "current project"?  

Filters exist outside projects in order for you to be able to search across projects.  The closest I can think of is the users "last visited project", but that would make most filters using it a nonsense because the results of a filter would change as a user wandered through issues.
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=50770
_______________________________________________
Jira-user mailing list
[hidden email]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user
Reply | Threaded
Open this post in threaded view
|

Re: Need a currentProject() function in filter syntax

forums-5
By "current project", I just mean the project marked as "Current Project" in Jira "Projects" menu. This concept is already used when you create a new issue.

This current project seems to be attached to user (since it is remembered after logout/login), and therefore may be used anywhere.
--
Post by syllant - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=50770
_______________________________________________
Jira-user mailing list
[hidden email]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user
Reply | Threaded
Open this post in threaded view
|

Re: Need a currentProject() function in filter syntax

forums-5
Yes, that's the one I was thinking of when I said the users current project.  

You'll have to find or write a plugin to add that facility.

It's not a good idea because it leads you to try to share invalid filters.  It's a human thing - I mean if I'm looking at project X, and I filter for current project, then when someone else looks at it, they'll pick up their current project Y, which is useless to both of us and utterly confusing.  Humans are fine with the concept of "current assignee", but "project someone else was looking at and has nothing to do with what I'm interested in" is not so good.  You could add code so that the link generated would contain a hard-coded project instead of "current", but in that case, why not just explicitly use the current project?
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=50770
_______________________________________________
Jira-user mailing list
[hidden email]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user
Reply | Threaded
Open this post in threaded view
|

Re: Need a currentProject() function in filter syntax

forums-5
I understand your concerns even though they are also appliable on other dynamic values (currentUser(), now(), ...) and I'm not sure they would bother us: following our use of Jira, it's not a problem wether a filter depends on current context and does not show same results for 2 users. But I guess it may be a real concern if you mention it.

Here is my objective: we manage several filters (~10) on our main project such as:
* To Resolve [all releases]
* To Resolve [next release]
* To Resolve [next release][me]
* To Test [next release]
* To Test [next release][me]
...

We have also auxiliary projects (~10) which have same filter needs. But I want to avoid to duplicate these 10 filters for each project. When I'm working on a project X, I'd like these generic filters be applied on this project.

Maybe this would require another concept I don't know about, if you have any clue...
--
Post by syllant - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=50770
_______________________________________________
Jira-user mailing list
[hidden email]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user
Reply | Threaded
Open this post in threaded view
|

Re: Need a currentProject() function in filter syntax

forums-5
Disclaimer: I come from Mantis, and use Jira filters as I used Mantis filters, which are project-agnostic since they are applied on the current project :)
--
Post by syllant - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=50770
_______________________________________________
Jira-user mailing list
[hidden email]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user
Reply | Threaded
Open this post in threaded view
|

Re: Need a currentProject() function in filter syntax

forums-5
In reply to this post by forums-5
I'm just pointing out that the filter doesn't really work for humans (in fact, it's one of the main reasons I was asked to migrate one customer from Mantis to Jira - because "searching doesn't work, and people get different results from searches").  Other dynamic values do work, because of the way humans think ("current user" is useful because humans are quite self-centered.  "now" works because it's the same for everyone and directly implies a variable.  "last project I happened to look at, which might change because I look at a link or create another issue or run another report" doesn't).  In some cases, it may work fine, with a bit of education for users.

I think your only option is code - I can't see anything that would do the job for you.  Have a look at http://confluence.atlassian.com/display/DEVNET/Plugin+Tutorial+-+Adding+a+JQL+Function+to+JIRA
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=50770
_______________________________________________
Jira-user mailing list
[hidden email]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user
Reply | Threaded
Open this post in threaded view
|

Re: Need a currentProject() function in filter syntax

forums-5
OK, I've implemented this trival function, this works as I was expecting.

Thanks Nic :)
--
Post by syllant - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=50770
_______________________________________________
Jira-user mailing list
[hidden email]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user
Reply | Threaded
Open this post in threaded view
|

Re: Need a currentProject() function in filter syntax

andrewosullivan-wiliam
Hi forums-5/Syllant,

I am a non-dev, trying to implement a currentProject() JQL function, but it's proving beyond me. I can't believe there isn't a plugin available to handle this!

I was wondering if you'd mind helping me out and sending me instructions/code for implementing this - evidently - trivial function? It would make my day.

Thanks so much for any help you can provide.

Kindly,

Andrew O'Sullivan


forums-5 wrote
OK, I've implemented this trival function, this works as I was expecting.

Thanks Nic :)
--
Post by syllant - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=50770
_______________________________________________
Jira-user mailing list
Jira-user@lists.atlassian.com
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user